|
|
|
@ -644,7 +644,6 @@ class TestWorker(RQTestCase):
|
|
|
|
|
# Score in queue is +inf
|
|
|
|
|
self.assertEqual(self.testconn.zscore(registry.key, job.id), float('Inf'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_work_unicode_friendly(self):
|
|
|
|
|
"""Worker processes work with unicode description, then quits."""
|
|
|
|
|
q = Queue('foo')
|
|
|
|
@ -909,7 +908,7 @@ class TestWorker(RQTestCase):
|
|
|
|
|
"""Check that log_job_description True causes job lifespan to be logged."""
|
|
|
|
|
q = Queue()
|
|
|
|
|
w = Worker([q])
|
|
|
|
|
job = q.enqueue(say_hello, args=('Frank',), result_ttl=10)
|
|
|
|
|
q.enqueue(say_hello, args=('Frank',), result_ttl=10)
|
|
|
|
|
w.dequeue_job_and_maintain_ttl(10)
|
|
|
|
|
self.assertIn("Frank", mock_logger_info.call_args[0][2])
|
|
|
|
|
|
|
|
|
@ -918,7 +917,7 @@ class TestWorker(RQTestCase):
|
|
|
|
|
"""Check that log_job_description False causes job lifespan to not be logged."""
|
|
|
|
|
q = Queue()
|
|
|
|
|
w = Worker([q], log_job_description=False)
|
|
|
|
|
job = q.enqueue(say_hello, args=('Frank',), result_ttl=10)
|
|
|
|
|
q.enqueue(say_hello, args=('Frank',), result_ttl=10)
|
|
|
|
|
w.dequeue_job_and_maintain_ttl(10)
|
|
|
|
|
self.assertNotIn("Frank", mock_logger_info.call_args[0][2])
|
|
|
|
|
|
|
|
|
|