diff --git a/examples/example_standard_scripts.yaml b/examples/example_standard_scripts.yaml index 8f57b623..3eafbcc4 100644 --- a/examples/example_standard_scripts.yaml +++ b/examples/example_standard_scripts.yaml @@ -49,7 +49,6 @@ name: bps_panda_submit_script handler: lsst.cmservice.handlers.jobs.PandaScriptHandler data: - wms: panda bps_wms_yaml_file: "${CTRL_BPS_PANDA_DIR}/config/bps_usdf.yaml" # Run a bps report script - SpecBlock: @@ -59,8 +58,6 @@ - SpecBlock: name: bps_htcondor_submit_script handler: lsst.cmservice.handlers.jobs.HTCondorScriptHandler - data: - wms: htcondor # Run a bps report script - SpecBlock: name: bps_htcondor_report_script diff --git a/src/lsst/cmservice/common/enums.py b/src/lsst/cmservice/common/enums.py index c7ef7cdd..4c8d0448 100644 --- a/src/lsst/cmservice/common/enums.py +++ b/src/lsst/cmservice/common/enums.py @@ -248,7 +248,7 @@ class WmsMethodEnum(enum.Enum): panda = 1 Runs under PanDA - ht_condor = 2 + htcondor = 2 Runs under HTCondor More methods to come... @@ -257,4 +257,4 @@ class WmsMethodEnum(enum.Enum): default = -1 bash = 0 panda = 1 - ht_condor = 2 + htcondor = 2 diff --git a/src/lsst/cmservice/handlers/jobs.py b/src/lsst/cmservice/handlers/jobs.py index 2338ce85..c4ba6513 100644 --- a/src/lsst/cmservice/handlers/jobs.py +++ b/src/lsst/cmservice/handlers/jobs.py @@ -58,6 +58,8 @@ class BpsScriptHandler(ScriptHandler): `parent.collections['run']` """ + wms_method = WmsMethodEnum.default + async def _write_script( self, session: async_scoped_session, @@ -116,6 +118,7 @@ async def _write_script( # workflow_config becomes values dictionary to use while rendering a # yaml template, NOT the yaml template itself! workflow_config: dict[str, Any] = {} + workflow_config["wms"] = self.wms_method.name workflow_config["project"] = parent.p_.name # type: ignore workflow_config["campaign"] = parent.c_.name # type: ignore workflow_config["submit_path"] = str(submit_path) @@ -425,7 +428,7 @@ def get_job_id(cls, bps_dict: dict) -> str: class HTCondorScriptHandler(BpsScriptHandler): """Class to handle running Bps for ht_condor jobs""" - wms_method = WmsMethodEnum.ht_condor + wms_method = WmsMethodEnum.htcondor @classmethod def get_job_id(cls, bps_dict: dict) -> str: