#!/usr/bin/python import time class Job(object): def __init__(self, **options): self.jobid = options.has_key('jobid') and options['jobid'] or None self.funcname = options['funcname'] self.arg = options['arg'] self.run_after = options.has_key('run_after') and options['run_after'] or int(time.time()) self.grabbed_until = options.has_key('grabbed_until') and options['grabbed_until'] or 0 self.uniqkey = options.has_key('uniqkey') and options['uniqkey'] or None self.priority = options.has_key('priority') and options['priority'] or 1 self.coalesce = options.has_key('coalesce') and options['coalesce'] or None