|
|
@ -165,7 +165,7 @@ class Worker(object):
|
|
|
|
self.state = 'idle'
|
|
|
|
self.state = 'idle'
|
|
|
|
qnames = ', '.join(self.queue_names())
|
|
|
|
qnames = ', '.join(self.queue_names())
|
|
|
|
self.procline('Waiting on %s' % (qnames,))
|
|
|
|
self.procline('Waiting on %s' % (qnames,))
|
|
|
|
self.log.info('Watching queues: %s' % (qnames,))
|
|
|
|
self.log.info('Waiting for jobs on %s' % (qnames,))
|
|
|
|
wait_for_job = not quit_when_done
|
|
|
|
wait_for_job = not quit_when_done
|
|
|
|
job = Queue.dequeue_any(self.queues, wait_for_job)
|
|
|
|
job = Queue.dequeue_any(self.queues, wait_for_job)
|
|
|
|
if job is None:
|
|
|
|
if job is None:
|
|
|
@ -210,8 +210,12 @@ class Worker(object):
|
|
|
|
os.waitpid(child_pid, 0)
|
|
|
|
os.waitpid(child_pid, 0)
|
|
|
|
|
|
|
|
|
|
|
|
def perform_job(self, job):
|
|
|
|
def perform_job(self, job):
|
|
|
|
self.procline('Processing %s from %s since %s' % (job.func.__name__, job.origin.name, time.time()))
|
|
|
|
self.procline('Processing %s from %s since %s' % (
|
|
|
|
msg = 'Processing job %s from queue %s' % (job, job.origin.name)
|
|
|
|
job.func.__name__,
|
|
|
|
|
|
|
|
job.origin.name, time.time()))
|
|
|
|
|
|
|
|
msg = 'Processing job %s from queue %s' % (
|
|
|
|
|
|
|
|
job.call_string,
|
|
|
|
|
|
|
|
job.origin.name)
|
|
|
|
self.log.debug(msg)
|
|
|
|
self.log.debug(msg)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
rv = job.perform()
|
|
|
|
rv = job.perform()
|
|
|
|