diff --git a/config/runtime.exs b/config/runtime.exs index 4575cdef..da797fdf 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -141,6 +141,7 @@ if config_env() == :prod do terrain: 3, iemre: 3, era5: 2, + era5_batch: 2, rtma: 2, backfill_enqueue: 1 ], diff --git a/lib/microwaveprop/workers/era5_month_batch_worker.ex b/lib/microwaveprop/workers/era5_month_batch_worker.ex index 910928e7..2533b796 100644 --- a/lib/microwaveprop/workers/era5_month_batch_worker.ex +++ b/lib/microwaveprop/workers/era5_month_batch_worker.ex @@ -13,9 +13,13 @@ defmodule Microwaveprop.Workers.Era5MonthBatchWorker do Uniqueness on the full arg set means Oban collapses duplicate enqueues for the same tile-month — multiple `Era5FetchWorker` requests for the same region collapse into a single batch. + + Runs on its own `:era5_batch` queue so its slow CDS poll cycles don't + starve the fast `Era5FetchWorker` router that also lives in the ERA5 + namespace. """ use Oban.Worker, - queue: :era5, + queue: :era5_batch, max_attempts: 3, unique: [ period: :infinity,