Truncate valid_time microseconds for Ecto utc_datetime
This commit is contained in:
parent
22cb055269
commit
becdf89978
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ defmodule Microwaveprop.Workers.PropagationGridWorker do
|
|||
def perform(%Oban.Job{}) do
|
||||
# HRRR takes ~45min to publish after the hour. Use 2 hours ago to ensure availability.
|
||||
two_hours_ago = DateTime.add(DateTime.utc_now(), -2, :hour)
|
||||
valid_time = HrrrClient.nearest_hrrr_hour(two_hours_ago)
|
||||
valid_time = two_hours_ago |> HrrrClient.nearest_hrrr_hour() |> DateTime.truncate(:second)
|
||||
points = Grid.conus_points()
|
||||
|
||||
Logger.info("PropagationGrid: pausing backfill queues, fetching HRRR for #{valid_time}, #{length(points)} points")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue