|
|
|
@ -165,7 +165,7 @@ class Worker(object):
|
|
|
|
|
self.state = 'idle'
|
|
|
|
|
qnames = ', '.join(self.queue_names())
|
|
|
|
|
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
|
|
|
|
|
job = Queue.dequeue_any(self.queues, wait_for_job)
|
|
|
|
|
if job is None:
|
|
|
|
@ -210,8 +210,12 @@ class Worker(object):
|
|
|
|
|
os.waitpid(child_pid, 0)
|
|
|
|
|
|
|
|
|
|
def perform_job(self, job):
|
|
|
|
|
self.procline('Processing %s from %s since %s' % (job.func.__name__, job.origin.name, time.time()))
|
|
|
|
|
msg = 'Processing job %s from queue %s' % (job, job.origin.name)
|
|
|
|
|
self.procline('Processing %s from %s since %s' % (
|
|
|
|
|
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)
|
|
|
|
|
try:
|
|
|
|
|
rv = job.perform()
|
|
|
|
|