Changed status "Running" into "started" to be more consistent with the other statuses

main
Timo Steidle 12 years ago
parent 8787cfbb30
commit 881b944283

@ -14,7 +14,7 @@ def enum(name, *sequential, **named):
return type(name, (), values) return type(name, (), values)
Status = enum('Status', QUEUED='queued', FINISHED='finished', FAILED='failed', Status = enum('Status', QUEUED='queued', FINISHED='finished', FAILED='failed',
RUNNING='running') STARTED='started')
def unpickle(pickled_string): def unpickle(pickled_string):
@ -107,8 +107,8 @@ class Job(object):
return self.status == Status.FAILED return self.status == Status.FAILED
@property @property
def is_running(self): def is_started(self):
return self.status == Status.RUNNING return self.status == Status.STARTED
@property @property
def func(self): def func(self):

@ -321,7 +321,7 @@ class Worker(object):
job, queue = result job, queue = result
# Use the public setter here, to immediately update Redis # 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), self.log.info('%s: %s (%s)' % (green(queue.name),
blue(job.description), job.id)) blue(job.description), job.id))

Loading…
Cancel
Save