diff --git a/config/runtime.exs b/config/runtime.exs index 82577ee9..8063e8b1 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -68,6 +68,21 @@ if config_env() == :prod do config :microwaveprop, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY") config :microwaveprop, srtm_tiles_dir: "/srtm" + # Production Oban: only live scoring and polling, no historical backfill + config :microwaveprop, Oban, + queues: [propagation: 1, commercial: 2, solar: 1], + plugins: [ + {Oban.Plugins.Pruner, max_age: 3600 * 24}, + {Oban.Plugins.Lifeline, rescue_after: 30 * 60 * 1000}, + {Oban.Plugins.Cron, + crontab: [ + {"0 8 * * *", Microwaveprop.Workers.SolarIndexWorker}, + {"*/5 * * * *", Microwaveprop.Commercial.PollWorker}, + {"5 * * * *", Microwaveprop.Workers.PropagationGridWorker}, + {"*/10 * * * *", Microwaveprop.Workers.AsosAdjustmentWorker} + ]} + ] + # ## SSL Support # # To get SSL working, you will need to add the `https` key