Skip to content

Commit 89c831d

Browse files
authored
Merge pull request #427 from JeffersonLab/iss426
add an option for cleanup of jobs
2 parents fb6f998 + 1f2f3da commit 89c831d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/hpsmc/job.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ class Job(object):
171171
"""
172172
_config_names = ['enable_copy_output_files',
173173
'enable_copy_input_files',
174+
'enable_cleanup',
174175
'delete_existing',
175176
'delete_rundir',
176177
'dry_run',
@@ -227,6 +228,7 @@ def __init__(self, args=sys.argv, **kwargs):
227228
## These attributes can all be set in the config file.
228229
self.enable_copy_output_files = True
229230
self.enable_copy_input_files = True
231+
self.enable_cleanup = True
230232
self.delete_existing = False
231233
self.delete_rundir = False
232234
self.dry_run = False
@@ -531,7 +533,8 @@ def run(self):
531533
logger.warning('Copy output files is disabled!')
532534

533535
# Perform job cleanup.
534-
self._cleanup()
536+
if self.enable_cleanup:
537+
self._cleanup()
535538

536539
logger.info('Successfully finished running job: %s' % self.description)
537540

0 commit comments

Comments
 (0)