Example #1
0
    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'),
        }
Example #2
0
File: job.py Project: B-Rich/mtq
 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'),
            }
Example #3
0
 def last_check_in(self):
     'last check in time'
     return self.doc.get('check-in', nulltime())