Skip to content

Commit

Permalink
add env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Jan 10, 2025
1 parent 7307235 commit f4799a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/nwp_consumer/internal/services/consumer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ def _parallelize_generator[T](
n_jobs = 1


n_jobs=4
prefer="processes"
if os.getenv("USE_PROCESSES", "False").capitalize() == "True":
prefer="processes"

if os.getenv("N_JOBS", None) is not None:
n_jobs = int(os.getenv("N_JOBS"))

log.debug(f"Using {n_jobs} concurrent {prefer}")

Expand Down

0 comments on commit f4799a1

Please sign in to comment.