def METHOD_NAME(self):
    self.poll_interval_s = int(self.options.get("poll_interval", 10))
    self._poll()  # will block until poll_complete
    self.logger.info("Job is complete.")
    summary = self.summarize_subjobs(self.subjobs)
    failed_batches = self.failed_batches(self.subjobs)
    job_aborted = summary["AnyAborted"]
    job_failed = summary[
        "AnyFailed"
    ]  # note that a failed sub-job is different than a failed batch
    # per https://help.salesforce.com/articleView?id=code_apex_job.htm&type=5
    if job_aborted:
        raise SalesforceException("Job was aborted by a user.")
    elif job_failed:
        raise SalesforceException("Job experienced a system failure.")
    elif failed_batches:
        self.logger.info("There have been some batch failures.")
        raise SalesforceException(
            f"There were batch errors: {repr(failed_batches)}"
        )
    elif not summary["CountsAddUp"]:
        self.logger.info("The final record counts do not add up.")
        self.logger.info("This is probably related to W-1132237")
        self.logger.info(repr(summary))
    if len(self.subjobs) > 1:
        subjob_summary = f" in {len(self.subjobs)} sub-jobs"
    else:
        subjob_summary = ""
    self.logger.info(
        f"{self.options['class_name']} took {summary['ElapsedTime']} seconds to process {summary['TotalJobItems']} batches{subjob_summary}."
    )