Renamed Worker.fork_and_perform_job to Worker.execute_job.

This commit is contained in:
Selwin Ong 2014-02-10 22:19:23 +07:00
parent 9ad7da684c
commit 2044e790f5
1 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ class Worker(object):
blue(job.description), job.id)) blue(job.description), job.id))
self.heartbeat((job.timeout or 180) + 60) self.heartbeat((job.timeout or 180) + 60)
self.fork_and_perform_job(job) self.execute_job(job)
self.heartbeat() self.heartbeat()
if job.status == Status.FINISHED: if job.status == Status.FINISHED:
queue.enqueue_dependents(job) queue.enqueue_dependents(job)
@ -359,7 +359,7 @@ class Worker(object):
self.log.debug('Sent heartbeat to prevent worker timeout. ' self.log.debug('Sent heartbeat to prevent worker timeout. '
'Next one should arrive within {0} seconds.'.format(timeout)) 'Next one should arrive within {0} seconds.'.format(timeout))
def fork_and_perform_job(self, job): def execute_job(self, job):
"""Spawns a work horse to perform the actual work and passes it a job. """Spawns a work horse to perform the actual work and passes it a job.
The worker will wait for the work horse and make sure it executes The worker will wait for the work horse and make sure it executes
within the given timeout bounds, or will end the work horse with within the given timeout bounds, or will end the work horse with