示例#1
0
文件: task.py 项目: dreamfrog/jophiel
 def _set_started(self, dt):
     if dt:
         value = int(time.mktime(dt.timetuple()))
         client.set(self.resq_start% self, value)
     else:
         client.delete(self.resq_start% self)
示例#2
0
文件: task.py 项目: dreamfrog/jophiel
 def register(self):
     client.sadd(self.resq_tasks, str(self))
     client.set(self.resq_queue%self.task_id,self.queue)
     client.set(self.resq_name%self.task_id,self.task_name)
     client.set(self.resq_params%self.task_id,self.params)
     self.started = datetime.datetime.now()
示例#3
0
文件: task.py 项目: dreamfrog/jophiel
 def update_status(self,status):
     client.set(self.resq_status%self.task_id,status)  
示例#4
0
 def _set_started(self, dt):
     if dt:
         key = int(time.mktime(dt.timetuple()))
         client.set(self.resq_worker_start % self.worker_id, key)
     else:
         client.delete(self.resq_worker_start % self.worker_id)