Remove queue pausing from PropagationGridWorker

This commit is contained in:
Graham McIntire 2026-04-02 15:30:06 -05:00
parent 15a09f0d7b
commit d95098daa9
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -18,9 +18,6 @@ defmodule Microwaveprop.Workers.PropagationGridWorker do
require Logger require Logger
# Pause these queues while the grid fetch runs so they don't compete for bandwidth.
# Keep :hrrr running so on-demand contact detail fetches aren't blocked.
@pause_queues [:weather, :iemre, :terrain]
@max_forecast_hour 18 @max_forecast_hour 18
@impl Oban.Worker @impl Oban.Worker
@ -34,9 +31,6 @@ defmodule Microwaveprop.Workers.PropagationGridWorker do
Logger.info("PropagationGrid: run_time=#{run_time}, #{length(points)} points, f00-f#{@max_forecast_hour}") Logger.info("PropagationGrid: run_time=#{run_time}, #{length(points)} points, f00-f#{@max_forecast_hour}")
Enum.each(@pause_queues, &Oban.pause_queue(queue: &1))
try do
for_result = for_result =
for fh <- 0..@max_forecast_hour do for fh <- 0..@max_forecast_hour do
valid_time = DateTime.add(run_time, fh * 3600, :second) valid_time = DateTime.add(run_time, fh * 3600, :second)
@ -61,14 +55,10 @@ defmodule Microwaveprop.Workers.PropagationGridWorker do
total_ms = System.monotonic_time(:millisecond) - t_start total_ms = System.monotonic_time(:millisecond) - t_start
Logger.info("PropagationGrid: total time #{format_duration(total_ms)} (#{length(valid_times)} forecast hours)") Logger.info("PropagationGrid: total time #{format_duration(total_ms)} (#{length(valid_times)} forecast hours)")
:ok
after
Logger.info("PropagationGrid: resuming backfill queues")
Enum.each(@pause_queues, &Oban.resume_queue(queue: &1))
Weather.prune_old_grid_profiles() Weather.prune_old_grid_profiles()
Propagation.prune_old_scores() Propagation.prune_old_scores()
end
:ok
end end
defp process_forecast_hour(points, run_time, forecast_hour, valid_time) do defp process_forecast_hour(points, run_time, forecast_hour, valid_time) do