Skip to content

Commit

Permalink
Add temporal address endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 26, 2024
1 parent fa6d069 commit d5c3387
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion oonipipeline/src/oonipipeline/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def _parse_csv(ctx, param, s: Optional[str]) -> List[str]:
"--clickhouse", type=str, required=True, default="clickhouse://localhost"
)
telemetry_endpoint_option = click.option(
"--telemetry_endpoint", type=str, required=True, default="http://localhost:4317"
"--telemetry-endpoint", type=str, required=True, default="http://localhost:4317"
)
temporal_address_option = click.option(
"--temporal-address", type=str, required=True, default="http://localhost:4317"
)

datadir_option = click.option(
Expand Down Expand Up @@ -182,6 +185,7 @@ def cli(log_level: int):
@datadir_option
@parallelism_option
@telemetry_endpoint_option
@temporal_address_option
@click.option(
"--fast-fail",
is_flag=True,
Expand Down Expand Up @@ -209,6 +213,7 @@ def mkobs(
create_tables: bool,
drop_tables: bool,
telemetry_endpoint: str,
temporal_address: str,
):
"""
Make observations for OONI measurements and write them into clickhouse or a CSV file
Expand Down Expand Up @@ -246,6 +251,7 @@ def mkobs(
parallelism=parallelism,
workflow_id_prefix="oonipipeline-mkobs",
telemetry_endpoint=telemetry_endpoint,
temporal_address=temporal_address,
)
)

Expand All @@ -259,6 +265,7 @@ def mkobs(
@datadir_option
@parallelism_option
@telemetry_endpoint_option
@temporal_address_option
@click.option(
"--fast-fail",
is_flag=True,
Expand All @@ -280,6 +287,7 @@ def mkanalysis(
fast_fail: bool,
create_tables: bool,
telemetry_endpoint: str,
temporal_address: str,
):
if create_tables:
with ClickhouseConnection(clickhouse) as db:
Expand Down Expand Up @@ -308,6 +316,7 @@ def mkanalysis(
parallelism=parallelism,
workflow_id_prefix="oonipipeline-mkanalysis",
telemetry_endpoint=telemetry_endpoint,
temporal_address=temporal_address,
)
)

Expand All @@ -319,13 +328,15 @@ def mkanalysis(
@datadir_option
@parallelism_option
@telemetry_endpoint_option
@temporal_address_option
def mkgt(
start_day: str,
end_day: str,
clickhouse: str,
data_dir: Path,
parallelism: int,
telemetry_endpoint: str,
temporal_address: str,
):
click.echo("Starting to build ground truths")
NetinfoDB(datadir=Path(data_dir), download=True)
Expand All @@ -345,6 +356,7 @@ def mkgt(
parallelism=parallelism,
workflow_id_prefix="oonipipeline-mkgt",
telemetry_endpoint=telemetry_endpoint,
temporal_address=temporal_address,
)
)

Expand Down

0 comments on commit d5c3387

Please sign in to comment.