Skip to content

Commit

Permalink
pass mapper arg into wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
rkm committed Nov 14, 2024
1 parent df7d22c commit d165bcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roles/bin/templates/bin/_smi_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def run(
pass


def run_smiservices(config_path: str, single_instance: bool = False) -> None:
def run_smiservices(
config_path: str,
*args: str,
single_instance: bool = False,
) -> None:
wrapper_args, remaining_argv = init()

if wrapper_args.copies > 1 and single_instance:
Expand All @@ -91,5 +95,5 @@ def run_smiservices(config_path: str, single_instance: bool = False) -> None:

smi_bin = os.environ["SMI_SMISERVICES_BIN"]
app_name = sys.argv[0].rpartition("smi-")[-1]
cmd = (smi_bin, app_name, "-y", config_path)
cmd = (smi_bin, app_name, *args, "-y", config_path)
run(wrapper_args, remaining_argv, cmd)
1 change: 1 addition & 0 deletions roles/bin/templates/bin/smi-trigger-updates
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ import _smi_wrapper as wrapper

wrapper.run_smiservices(
os.environ["SMI_SMISERVICES_INGEST_PIPELINE_CONFIG"],
"mapper",
single_instance=True,
)

0 comments on commit d165bcd

Please sign in to comment.