PEP8 cleanups, remove unused imports, add missing imports

This commit is contained in:
Roberto Rosario
2012-09-29 01:40:33 -04:00
parent 0f1e01084c
commit e62835fd27
25 changed files with 36 additions and 60 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ class Job(object):
# OR launch 2 processes: monitor & actual process
node = Node.objects.myself()
worker, created = Worker.objects.get_or_create(node=node, pid=os.getpid())
worker.job_queue_item=job_queue_item
worker.job_queue_item = job_queue_item
worker.save()
try:
transaction.commit_on_success(function)(**loads(job_queue_item.kwargs))
@@ -248,7 +248,7 @@ class JobQueueItem(models.Model):
at_top: requeue at the top of the file usually for jobs that
die and shouldn't be placed at the bottom of the queue
"""
if self.is_in_error_state or force==True:
if self.is_in_error_state or force == True:
# TODO: raise exception if not in error state
self.state = JOB_STATE_PENDING
if not at_top: