From 881b9442832af739a004bfed9bb659ac0722c453 Mon Sep 17 00:00:00 2001 From: Timo Steidle Date: Fri, 7 Sep 2012 13:31:39 +0200 Subject: [PATCH] Changed status "Running" into "started" to be more consistent with the other statuses --- rq/job.py | 6 +++--- rq/worker.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rq/job.py b/rq/job.py index c14733e..89ab015 100644 --- a/rq/job.py +++ b/rq/job.py @@ -14,7 +14,7 @@ def enum(name, *sequential, **named): return type(name, (), values) Status = enum('Status', QUEUED='queued', FINISHED='finished', FAILED='failed', - RUNNING='running') + STARTED='started') def unpickle(pickled_string): @@ -107,8 +107,8 @@ class Job(object): return self.status == Status.FAILED @property - def is_running(self): - return self.status == Status.RUNNING + def is_started(self): + return self.status == Status.STARTED @property def func(self): diff --git a/rq/worker.py b/rq/worker.py index 91f3333..15849cb 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -321,7 +321,7 @@ class Worker(object): job, queue = result # Use the public setter here, to immediately update Redis - job.status = Status.RUNNING + job.status = Status.STARTED self.log.info('%s: %s (%s)' % (green(queue.name), blue(job.description), job.id))