Beispiel #1
0
 def finish_job(self, job):
     """
         Receive finish_job rpc request from worker.
         :type job_id str
         :type is_success bool
         :type details str
         :type filter_key str or int
         :type filter_value str or int
     """
     self.log.debug("job_id [%s] finish" % job.id)
     RQMasterBase.finish_job(self, job)
     # add job into filter only when job is finish successfully
     if job.is_success and job.need_filter:
         self.filter.add(job.filter_key, job.id)
Beispiel #2
0
 def __init__(self, timezone=None):
     RQMasterBase.__init__(self, timezone)
     self.filter = RedisFilter(**settings.FILTER_CONFIG)
     self.filter_lock = RLock()