|
|
@ -217,3 +217,13 @@ class TestFailedQueue(RQTestCase):
|
|
|
|
# Assert that we cannot requeue a job that's not on the failed queue
|
|
|
|
# Assert that we cannot requeue a job that's not on the failed queue
|
|
|
|
with self.assertRaises(InvalidJobOperationError):
|
|
|
|
with self.assertRaises(InvalidJobOperationError):
|
|
|
|
get_failed_queue().requeue(job.id)
|
|
|
|
get_failed_queue().requeue(job.id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_quarantine_preserves_timeout(self):
|
|
|
|
|
|
|
|
"""Quarantine preserves job timeout."""
|
|
|
|
|
|
|
|
job = Job.create(div_by_zero, 1, 2, 3)
|
|
|
|
|
|
|
|
job.origin = 'fake'
|
|
|
|
|
|
|
|
job.timeout = 200
|
|
|
|
|
|
|
|
job.save()
|
|
|
|
|
|
|
|
get_failed_queue().quarantine(job, Exception('Some fake error'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.assertEquals(job.timeout, 200)
|
|
|
|