set job state to new in upload tool action so that track_jobs_in_database works

This commit is contained in:
Nate Coraor
2009-08-25 11:53:42 -04:00
parent 400ed1ce37
commit 4158ee0833
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -144,6 +144,7 @@ class UploadToolAction( ToolAction ):
job.add_parameter( 'paramfile', to_json_string( json_file_path ) )
for i, dataset in enumerate( data_list ):
job.add_output_dataset( i, dataset )
job.state = trans.app.model.Job.states.NEW
trans.app.model.flush()
# Queue the job for execution
+2
View File
@@ -206,6 +206,8 @@ def add_file( dataset, json_file ):
elif ext == 'scf' and dataset.file_type != 'scf':
file_err( "You must manually set the 'File Format' to 'Scf' when uploading scf files.", dataset, json_file )
return
else:
ext = 'binary'
data_type = 'binary'
if not data_type:
# We must have a text file