-
Notifications
You must be signed in to change notification settings - Fork 95
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
Scheduled jobs with unique #715
Comments
Yeah, it does indeed look like this'll always used the current time. I think it should work to alternatively use |
brandur
added a commit
that referenced
this issue
Jan 25, 2025
This one attempts to resolve #715. Currently, by period uniqueness always bases the period off the current time, but there's a good argument that if the job has been scheduled for a particular time in the future, it should be based off that time instead. This is one that could nominally be considered a small breaking change in a Hyrum's Law sort of way, even though it's really patching what could be considered a bug. Even though it was sort of broken before, some apps may have come to depend on the broken behavior of the unique code ignoring `ScheduledAt`. I'm not sure that it's a big enough problem to be worth calling out though, so I didn't. Fixes #715.
brandur
added a commit
that referenced
this issue
Jan 25, 2025
This one attempts to resolve #715. Currently, by period uniqueness always bases the period off the current time, but there's a good argument that if the job has been scheduled for a particular time in the future, it should be based off that time instead. This is one that could nominally be considered a small breaking change in a Hyrum's Law sort of way, even though it's really patching what could be considered a bug. Even though it was sort of broken before, some apps may have come to depend on the broken behavior of the unique code ignoring `ScheduledAt`. I'm not sure that it's a big enough problem to be worth calling out though, so I didn't. Fixes #715.
Posted a fix for this in #734. It'll go out with the next release. |
@brandur Great, thanx. I will try it when it is released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm dynamically inserting jobs into river with ScheduledAt attribute.
It seems from my tests that when I call:
twice in a loop, second job is treated as violating uniqueness condition and not created.
scheduleTime
is (of course) different by more than 12 minutes.Does "Uniqueness" feature check only created time, and dosen't work well with scheduled?
The text was updated successfully, but these errors were encountered: