mirror of https://github.com/rq/rq.git
Remove is_done property.
It is too similar to is_finished.
This commit is contained in:
parent
bc7e32bae8
commit
6b0ebe9ceb
|
@ -103,10 +103,6 @@ class Job(object):
|
|||
def is_failed(self):
|
||||
return self.status == Status.FAILED
|
||||
|
||||
@property
|
||||
def is_done(self):
|
||||
return self._status is not None and not self.is_queued
|
||||
|
||||
@property
|
||||
def func(self):
|
||||
func_name = self.func_name
|
||||
|
|
|
@ -181,7 +181,6 @@ class TestWorker(RQTestCase):
|
|||
self.assertEqual(job.is_queued, True)
|
||||
self.assertEqual(job.is_finished, False)
|
||||
self.assertEqual(job.is_failed, False)
|
||||
self.assertEqual(job.is_done, False)
|
||||
|
||||
w.work(burst=True)
|
||||
job = Job.fetch(job.id)
|
||||
|
@ -189,7 +188,6 @@ class TestWorker(RQTestCase):
|
|||
self.assertEqual(job.is_queued, False)
|
||||
self.assertEqual(job.is_finished, True)
|
||||
self.assertEqual(job.is_failed, False)
|
||||
self.assertEqual(job.is_done, True)
|
||||
|
||||
# Failed jobs should set status to "failed"
|
||||
job = q.enqueue(div_by_zero, args=(1,))
|
||||
|
@ -199,4 +197,3 @@ class TestWorker(RQTestCase):
|
|||
self.assertEqual(job.is_queued, False)
|
||||
self.assertEqual(job.is_finished, False)
|
||||
self.assertEqual(job.is_failed, True)
|
||||
self.assertEqual(job.is_done, True)
|
||||
|
|
Loading…
Reference in New Issue