mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
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:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user