contribsys / faktory

Language-agnostic persistent background job server
https://contribsys.com/faktory/
Other
5.71k stars 228 forks source link

Question regarding "reserve_for" in cron #421

Closed davidbyttow closed 1 year ago

davidbyttow commented 1 year ago

I probably missed this somewhere in documentation and I don't see it in the UI when using it, should reserve_for in the config be specified at the same level as the type and queue or does it belong in cron_job.custom section with expires_in etc. I assume the former since that's how it is specified in the worker payload.

E.g.,

[[cron]]
  schedule = "25 */4 * * *"
  [cron.job]
    type = "MyTask"
    reserve_for = 600

or

[[cron]]
  schedule = "25 */4 * * *"
  [cron.job]
    type = "MyTask"
    [cron.job.custom]
      reserve_for = 600

(would probably be worth documenting somewhere)

mperham commented 1 year ago

Your assumption is correct, reserve_for goes with type and args.

davidbyttow commented 1 year ago

Thanks!