mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Fix the race condition of the upload tool's outputs not being created before the output size check occurs. Thanks Tao Liu.
This commit is contained in:
@@ -322,9 +322,13 @@ def create_job( trans, params, tool, json_file_path, data_list, folder=None, ret
|
||||
if folder:
|
||||
for i, dataset in enumerate( data_list ):
|
||||
job.add_output_library_dataset( 'output%i' % i, dataset )
|
||||
# Create an empty file immediately
|
||||
open( dataset.file_name, "w" ).close()
|
||||
else:
|
||||
for i, dataset in enumerate( data_list ):
|
||||
job.add_output_dataset( 'output%i' % i, dataset )
|
||||
# Create an empty file immediately
|
||||
open( dataset.file_name, "w" ).close()
|
||||
job.state = job.states.NEW
|
||||
trans.sa_session.add( job )
|
||||
trans.sa_session.flush()
|
||||
|
||||
Reference in New Issue
Block a user