Move, rather than copy files staged back to Galaxy via the job files

api. Moving is a rename when the source and destination are on the same
filesystem, which is nearly instantaneous and greatly reduces the
possibility for failure due to mid-copy restarts.
This commit is contained in:
Nate Coraor
2015-04-10 15:30:31 -04:00
parent 1167c7d724
commit 7210e5d46e
+1 -1
View File
@@ -97,7 +97,7 @@ class JobFilesAPIController( BaseAPIController ):
input_file = payload.get( "file",
payload.get( "__file", None ) ).file
try:
shutil.copyfile( input_file.name, path )
shutil.move( input_file.name, path )
finally:
input_file.close()
return {"message": "ok"}