We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Keeping Oban's time units explicit
almirsarajcic
0 comments
Copy link
Oban’s Lifeline and Pruner accept raw integers in different units: rescue_after is milliseconds, while max_age is seconds.
On current Oban releases, use period tuples so the unit stays with the value:
config :my_app, Oban,
lifeline: [rescue_after: {2, :hours}],
pruner: [max_age: {7, :days}]
Reusing :timer.hours(168) for max_age would keep jobs for 604,800,000 seconds, or about 19 years, instead of seven days.
Older Oban releases used Oban.Plugins.Lifeline and Oban.Plugins.Pruner and accepted integers only, so check the documentation for the version you run.
copied to clipboard