fix(workers): unique dedup on polling workers so queued dups don't stack
This commit is contained in:
parent
1591ac740d
commit
0d4b24d6d4
2 changed files with 8 additions and 2 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
defmodule Microwaveprop.Workers.IemreFetchWorker do
|
defmodule Microwaveprop.Workers.IemreFetchWorker do
|
||||||
@moduledoc false
|
@moduledoc false
|
||||||
use Oban.Worker, queue: :iemre, max_attempts: 20
|
use Oban.Worker,
|
||||||
|
queue: :iemre,
|
||||||
|
max_attempts: 20,
|
||||||
|
unique: [period: 300, fields: [:args], states: [:scheduled, :available]]
|
||||||
|
|
||||||
alias Microwaveprop.Weather
|
alias Microwaveprop.Weather
|
||||||
alias Microwaveprop.Weather.IemClient
|
alias Microwaveprop.Weather.IemClient
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ defmodule Microwaveprop.Workers.RtmaFetchWorker do
|
||||||
Fetches RTMA surface observations for real-time propagation scoring.
|
Fetches RTMA surface observations for real-time propagation scoring.
|
||||||
15-minute resolution provides finer temporal detail than HRRR's hourly cycle.
|
15-minute resolution provides finer temporal detail than HRRR's hourly cycle.
|
||||||
"""
|
"""
|
||||||
use Oban.Worker, queue: :rtma, max_attempts: 10
|
use Oban.Worker,
|
||||||
|
queue: :rtma,
|
||||||
|
max_attempts: 10,
|
||||||
|
unique: [period: 300, fields: [:args], states: [:scheduled, :available]]
|
||||||
|
|
||||||
alias Microwaveprop.Repo
|
alias Microwaveprop.Repo
|
||||||
alias Microwaveprop.Weather.RtmaClient
|
alias Microwaveprop.Weather.RtmaClient
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue