task queue has status not state

This commit is contained in:
j 2016-08-25 17:16:11 +02:00
parent 8136a2c2f5
commit 1dd574cb9e

View file

@ -122,12 +122,12 @@ class Task(models.Model):
return False
def cancel(self):
self.state = 'cancelled'
self.status = 'cancelled'
self.save()
# FIXME: actually cancel task
def json(self):
if self.state != 'cancelled':
if self.status != 'cancelled':
self.update()
return {
'started': self.started,