code: async def run_check(self) -> int:
          
          await self.async_run()
          if self.jobs_failed:
              failed_job_results = [r for r in await self.pool.all_job_results() if not r.success]
              raise FailedJobs(self.jobs_failed, failed_job_results)
          else:
              return self.jobs_complete
docs: Run :func:`arq.worker.Worker.async_run`, check for failed jobs and raise :class:`arq.worker.FailedJobs`
          if any jobs have failed.
  
          :return: number of completed jobs