diff --git a/pycbc/workflow/core.py b/pycbc/workflow/core.py index 46536b476e8..692b04c6e60 100644 --- a/pycbc/workflow/core.py +++ b/pycbc/workflow/core.py @@ -61,6 +61,7 @@ def make_analysis_dir(path): class Executable(pegasus_workflow.Executable): # These are the file retention levels + DO_NOT_KEEP = 0 INTERMEDIATE_PRODUCT = 1 ALL_TRIGGERS = 2 MERGED_TRIGGERS = 3 @@ -147,6 +148,15 @@ def __init__(self, cp, name, ifos=None, out_dir=None, tags=None, self.update_output_directory(out_dir=out_dir) # Determine the level at which output files should be kept + if cp.has_option_tags('pegasus_profile-%s' % name, + 'pycbc|retention_level', tags): + # Get the retention_level from the config file + # This method allows us to use the retention levels + # defined above + cfg_ret_level = cp.get_opt_tags('pegasus_profile-%s' % name, + 'pycbc|retention_level', tags) + self.current_retention_level = getattr(self, cfg_ret_level) + self.update_current_retention_level(self.current_retention_level) # Should I reuse this executable?