Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tcjennings committed Feb 3, 2025
1 parent d36e6d3 commit e60de77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions examples/example_standard_scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lsst/cmservice/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand All @@ -257,4 +257,4 @@ class WmsMethodEnum(enum.Enum):
default = -1
bash = 0
panda = 1
ht_condor = 2
htcondor = 2
5 changes: 4 additions & 1 deletion src/lsst/cmservice/handlers/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class BpsScriptHandler(ScriptHandler):
`parent.collections['run']`
"""

wms_method = WmsMethodEnum.default

async def _write_script(
self,
session: async_scoped_session,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit e60de77

Please sign in to comment.