code: def perform_job(self, job):
          
  
          if self.config["trace_memory"]:
              job.trace_memory_start()
  
          set_current_job(job)
  
          try:
              job.perform()
  
          except MaxConcurrencyInterrupt:
              self.log.error("Max concurrency reached")
              job._save_status("maxconcurrency", exception=True)
  
          except RetryInterrupt:
              self.log.error("Caught retry")
              job.save_retry(sys.exc_info()[1])
  
          except MaxRetriesInterrupt:
              self.log.error("Max retries reached")
              job._save_status("maxretries", exception=True)
  
          except AbortInterrupt:
              self.log.error("Caught abort")
              job.save_abort()
  
          except TimeoutInterrupt:
              self.log.error("Job timeouted after %s seconds" % job.timeout)
              job._save_status("timeout", exception=True)
  
          except JobInterrupt:
              self.log.error("Job interrupted")
              job._save_status("interrupt", exception=True)
  
          except Exception:
              self.log.error("Job failed")
              job._save_status("failed", exception=True)
  
          finally:
  
              set_current_job(None)
  
              self.done_jobs += 1
  
              if self.config["trace_memory"]:
                  job.trace_memory_stop()
docs: Wraps a job.perform() call with timeout logic and exception handlers.
  
              This is the first call happening inside the greenlet.