Exemple #1
0
    def report_done(self, jobid, result=None):
        mq.done(self.queue, jobid)

        if result != None:
            assert self.queue != RESULT_QUEUE_NAME, "Putting a message on the done queue is not allowed!"
            result_str = json.dumps(result)
            mq.push_job(result_str, self.prefix+RESULT_QUEUE_NAME, timeout=60)
Exemple #2
0
 def add_task(self, jobobj, site=None):
     site = self._get_site(site)
     mq.push_job( json.dumps(jobobj), self.myqueue(site), 60*25)