Add the "upload" job state to prevent job runner from grabbing upload

jobs when tracking in the database.
This commit is contained in:
Nate Coraor
2008-11-11 10:19:21 -05:00
parent ff90618afa
commit d3d742ade0
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -46,6 +46,7 @@ class Job( object ):
parameters, and output datasets.
"""
states = Bunch( NEW = 'new',
UPLOAD = 'upload',
WAITING = 'waiting',
QUEUED = 'queued',
RUNNING = 'running',
+1
View File
@@ -38,6 +38,7 @@ class UploadToolAction( object ):
job.tool_version = tool.version
except:
job.tool_version = "1.0.0"
job.state = trans.app.model.Job.states.UPLOAD
job.flush()
log.info( 'tool %s created job id %d' % ( tool.id, job.id ) )
trans.log_event( 'created job id %d' % job.id, tool_id=tool.id )