code: def greenlet_timeouts(self):
          
  
          while True:
              now = datetime.datetime.utcnow()
              for greenlet in list(self.gevent_pool):
                  job = get_current_job(id(greenlet))
                  if job and job.timeout and job.datestarted:
                      expires = job.datestarted + datetime.timedelta(seconds=job.timeout)
                      if now > expires:
                          job.kill(block=False, reason="timeout")
  
              time.sleep(1)
docs: This greenlet kills jobs in other greenlets if they timeout.