def new(cls, name, tags, priority, execute, timeout): n = now() no = mktime(n.timetuple()) return { 'qname': name, 'tags': tags, 'process_after': n, 'priority': priority, 'execute': execute, 'enqueued_at': n, 'enqueued_at_': no, 'started_at': nulltime(), 'started_at_': 0.0, 'finished_at': nulltime(), 'finished_at_': 0.0, 'processed': False, 'failed': False, 'finished': False, 'timeout': timeout, 'worker_id': ObjectId('000000000000000000000000'), }
def new(cls, name, tags, priority, execute, timeout): n = now() no = mktime(n.timetuple()) return { 'qname':name, 'tags': tags, 'process_after': n, 'priority': priority, 'execute': execute, 'enqueued_at': n, 'enqueued_at_': no, 'started_at': nulltime(), 'started_at_': 0.0, 'finished_at': nulltime(), 'finished_at_': 0.0, 'processed': False, 'failed': False, 'finished': False, 'timeout':timeout, 'worker_id': ObjectId('000000000000000000000000'), }
def last_check_in(self): 'last check in time' return self.doc.get('check-in', nulltime())