Skip to content

Commit

Permalink
Rename process_count option
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 15, 2024
1 parent 5f83df0 commit 36b1f51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions oonipipeline/src/oonipipeline/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
async def run_workflow(
workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType],
arg: ParamType,
process_count: int = 5,
parallelism: int = 5,
temporal_address: str = "localhost:7233",
):
client = await TemporalClient.connect(temporal_address)
Expand All @@ -67,8 +67,8 @@ async def run_workflow(
make_ground_truths_in_day,
make_analysis_in_a_day,
],
activity_executor=concurrent.futures.ProcessPoolExecutor(process_count),
max_concurrent_activities=process_count,
activity_executor=concurrent.futures.ProcessPoolExecutor(parallelism + 2),
max_concurrent_activities=parallelism,
shared_state_manager=SharedStateManager.create_from_multiprocessing(
multiprocessing.Manager()
),
Expand Down Expand Up @@ -221,7 +221,7 @@ def mkobs(
run_workflow(
ObservationsWorkflow.run,
arg,
process_count=parallelism,
parallelism=parallelism,
)
)

Expand Down Expand Up @@ -292,7 +292,7 @@ def mkanalysis(
run_workflow(
AnalysisWorkflow.run,
arg,
process_count=parallelism,
parallelism=parallelism,
)
)

Expand Down

0 comments on commit 36b1f51

Please sign in to comment.