|
|
@ -471,22 +471,14 @@ class TestWorker(RQTestCase):
|
|
|
|
logging work properly"""
|
|
|
|
logging work properly"""
|
|
|
|
q = Queue("foo")
|
|
|
|
q = Queue("foo")
|
|
|
|
w = Worker([q])
|
|
|
|
w = Worker([q])
|
|
|
|
q.enqueue(
|
|
|
|
q.enqueue('tests.fixtures.say_hello', name='阿达姆',
|
|
|
|
'tests.fixtures.say_hello',
|
|
|
|
description='你好 世界!')
|
|
|
|
name='阿达姆',
|
|
|
|
self.assertEqual(w.work(burst=True), True,
|
|
|
|
description='你好 世界!')
|
|
|
|
'Expected at least some work done.')
|
|
|
|
self.assertEqual(
|
|
|
|
q.enqueue('tests.fixtures.say_hello_unicode', name='阿达姆',
|
|
|
|
w.work(burst=True),
|
|
|
|
description='你好 世界!')
|
|
|
|
True,
|
|
|
|
self.assertEqual(w.work(burst=True), True,
|
|
|
|
'Expected at least some work done.')
|
|
|
|
'Expected at least some work done.')
|
|
|
|
q.enqueue(
|
|
|
|
|
|
|
|
'tests.fixtures.say_hello_unicode',
|
|
|
|
|
|
|
|
name='阿达姆',
|
|
|
|
|
|
|
|
description='你好 世界!')
|
|
|
|
|
|
|
|
self.assertEqual(
|
|
|
|
|
|
|
|
w.work(burst=True),
|
|
|
|
|
|
|
|
True,
|
|
|
|
|
|
|
|
'Expected at least some work done.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_suspend_worker_execution(self):
|
|
|
|
def test_suspend_worker_execution(self):
|
|
|
|
"""Test Pause Worker Execution"""
|
|
|
|
"""Test Pause Worker Execution"""
|
|
|
|