mirror of https://github.com/rq/rq.git
Minor copywriting fixes.
This commit is contained in:
parent
eae2c40ea0
commit
01ab2f20dd
15
rq/worker.py
15
rq/worker.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue