Minor copywriting fixes.

This commit is contained in:
Selwin Ong 2015-01-23 13:58:25 +07:00
parent eae2c40ea0
commit 01ab2f20dd
1 changed files with 10 additions and 7 deletions

View File

@ -67,10 +67,13 @@ def signal_name(signum):
return 'SIG_UNKNOWN' return 'SIG_UNKNOWN'
WorkerStatus = enum('WorkerStatus', WorkerStatus = enum(
STARTED='started', SUSPENDED='suspended', BUSY='busy', 'WorkerStatus',
STARTED='started',
SUSPENDED='suspended',
BUSY='busy',
IDLE='idle' IDLE='idle'
) )
class Worker(object): class Worker(object):
@ -342,7 +345,7 @@ class Worker(object):
signal.signal(signal.SIGTERM, request_stop) signal.signal(signal.SIGTERM, request_stop)
def check_for_suspension(self, burst): def check_for_suspension(self, burst):
"""Check to see if the workers have been suspended by something like `rq suspend`""" """Check to see if workers have been suspended by `rq suspend`"""
before_state = None before_state = None
notified = False notified = False
@ -350,8 +353,8 @@ class Worker(object):
while not self.stopped and is_suspended(self.connection): while not self.stopped and is_suspended(self.connection):
if burst: if burst:
self.log.info('Suspended in burst mode -- exiting.') self.log.info('Suspended in burst mode -- exiting.'
self.log.info('Note: There could still be unperformed jobs on the queue') 'Note: There could still be unperformed jobs on the queue')
raise StopRequested raise StopRequested
if not notified: if not notified: