|
|
@ -227,3 +227,15 @@ class TestFailedQueue(RQTestCase):
|
|
|
|
get_failed_queue().quarantine(job, Exception('Some fake error'))
|
|
|
|
get_failed_queue().quarantine(job, Exception('Some fake error'))
|
|
|
|
|
|
|
|
|
|
|
|
self.assertEquals(job.timeout, 200)
|
|
|
|
self.assertEquals(job.timeout, 200)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_requeueing_preserves_timeout(self):
|
|
|
|
|
|
|
|
"""Requeueing 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'))
|
|
|
|
|
|
|
|
get_failed_queue().requeue(job.id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
job = Job.fetch(job.id)
|
|
|
|
|
|
|
|
self.assertEquals(job.timeout, 200)
|
|
|
|