Deleted job.set_started_at_now.

main
Selwin Ong 9 years ago
parent 364919c7c8
commit 45addbcaf2

@ -163,10 +163,6 @@ class Job(object):
status = property(_get_status, _set_status)
def set_started_at_now(self, pipeline=None):
now_fmt = utcformat(utcnow())
self.connection._hset(self.key, 'started_at', now_fmt, pipeline)
@property
def is_finished(self):
return self.get_status() == JobStatus.FINISHED

@ -551,7 +551,8 @@ class Worker(object):
registry = StartedJobRegistry(job.origin, self.connection)
registry.add(job, timeout, pipeline=pipeline)
job.set_status(JobStatus.STARTED, pipeline=pipeline)
job.set_started_at_now(pipeline=pipeline)
self.connection._hset(job.key, 'started_at',
utcformat(utcnow()), pipeline)
pipeline.execute()
msg = 'Processing {0} from {1} since {2}'

Loading…
Cancel
Save