diff --git a/rq/job.py b/rq/job.py index b73e3bd..ad1df2f 100644 --- a/rq/job.py +++ b/rq/job.py @@ -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 diff --git a/rq/worker.py b/rq/worker.py index a6e4a38..4a8a60e 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -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}'