mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
Only delete working/ and outputs on resubmission
This commit is contained in:
@@ -1113,6 +1113,7 @@ class JobWrapper(HasResourceParameters):
|
||||
# The tool execution is given a working directory beneath the
|
||||
# "job" working directory.
|
||||
safe_makedirs(self.tool_working_directory)
|
||||
safe_makedirs(os.path.join(working_directory, 'outputs'))
|
||||
log.debug('(%s) Working directory for job is: %s',
|
||||
self.job_id, self.working_directory)
|
||||
except ObjectInvalid:
|
||||
|
||||
@@ -101,7 +101,13 @@ def build_command(
|
||||
|
||||
# Remove the working directory incase this is for instance a SLURM re-submission.
|
||||
# xref https://github.com/galaxyproject/galaxy/issues/3289
|
||||
commands_builder.prepend_command("rm -rf working outputs; mkdir -p working outputs; cd working")
|
||||
commands_builder.prepend_command("""# Delete working/ and outputs/ only if job was resubmitted
|
||||
if [ -f .job_started ]; then
|
||||
rm -rf working outputs; mkdir -p working outputs
|
||||
fi
|
||||
touch .job_started
|
||||
cd working
|
||||
""", sep='')
|
||||
|
||||
container_monitor_command = job_wrapper.container_monitor_command(container)
|
||||
if container_monitor_command:
|
||||
|
||||
@@ -2269,9 +2269,8 @@ class OutputParameterJSONTool(Tool):
|
||||
json_params['output_data'].append(data_dict)
|
||||
if json_filename is None:
|
||||
json_filename = file_name
|
||||
out = open(json_filename, 'w')
|
||||
out.write(json.dumps(json_params))
|
||||
out.close()
|
||||
with open(json_filename, 'w') as out:
|
||||
out.write(json.dumps(json_params))
|
||||
|
||||
|
||||
class ExpressionTool(Tool):
|
||||
|
||||
Reference in New Issue
Block a user