Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enqueue immediately on missed job #7

Open
maltoe opened this issue Nov 16, 2018 · 1 comment
Open

Re-enqueue immediately on missed job #7

maltoe opened this issue Nov 16, 2018 · 1 comment

Comments

@maltoe
Copy link
Contributor

maltoe commented Nov 16, 2018

It would be nice if the reschedule method could detect if a job had passed the next schedule time while running, and would re-enqueue it immediately instead of waiting for the next schedule time.

Better example:

  • We have a service that runs hourly to retrieve some updated data from an external API.
  • Usually it has a runtime of well under an hour and everything is fine.
  • Sometimes though, it might run for, let's say 1h10m, and thus miss the "next" schedule time.
  • Current behaviour is to schedule it for in 50mins then, but I'd like it to (optionally) reschedule immediately, so it can start processing the next batch of data right away.

What do you think?

@maltoe maltoe changed the title Enqueue immediately on missed job Re-enqueue immediately on missed job Nov 16, 2018
@dsander
Copy link
Member

dsander commented Nov 19, 2018

I think that makes sense for certain jobs. The behavior should be optional because there are also situations in which one wants to make sure the job only runs at the configures times and not, for example, twice per hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants