diff --git a/lib/microwaveprop/propagation.ex b/lib/microwaveprop/propagation.ex index 3e910f7d..08c7e827 100644 --- a/lib/microwaveprop/propagation.ex +++ b/lib/microwaveprop/propagation.ex @@ -198,12 +198,18 @@ defmodule Microwaveprop.Propagation do end @doc """ - Remove score files with valid_times older than 2 hours. Called on + Remove score files with valid_times older than 3 hours. Called on a cron by `Microwaveprop.Workers.PropagationPruneWorker`. + + The cutoff sits one hour beyond HRRR's ~2h publish lag: the hourly + seeder picks `run_time = now - 2h`, so the f00 analysis file is + written at valid_time = now - 2h. A 2h cutoff deletes it within + minutes; a 3h cutoff keeps it alive until the next hourly run + supersedes it. """ @spec prune_old_scores() :: :ok def prune_old_scores do - cutoff = DateTime.add(DateTime.utc_now(), -2, :hour) + cutoff = DateTime.add(DateTime.utc_now(), -3, :hour) file_deleted = ScoresFile.prune_older_than(cutoff) profiles_deleted = ProfilesFile.prune_older_than(cutoff)