From 7210e5d46ebd2bb6509daf80d4fa3ff228164d26 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 10 Apr 2015 15:30:31 -0400 Subject: [PATCH] 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. --- lib/galaxy/webapps/galaxy/api/job_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/job_files.py b/lib/galaxy/webapps/galaxy/api/job_files.py index a6e2fbae870..4b21c1ceb5b 100644 --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -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"}