-
Notifications
You must be signed in to change notification settings - Fork 93
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
The ScheduledAt insert option doesn't work from JobArgsWithInsertOpts #484
Labels
bug
Something isn't working
Comments
bgentry
added a commit
that referenced
this issue
Jul 31, 2024
This allows for job arg definitions to utilize custom logic at the args level for determining when the job should be scheduled. Fixes #484.
bgentry
added a commit
that referenced
this issue
Jul 31, 2024
This allows for job arg definitions to utilize custom logic at the args level for determining when the job should be scheduled. Fixes #484.
bgentry
added a commit
that referenced
this issue
Jul 31, 2024
This allows for job arg definitions to utilize custom logic at the args level for determining when the job should be scheduled. Fixes #484.
bgentry
added a commit
that referenced
this issue
Jul 31, 2024
This allows for job arg definitions to utilize custom logic at the args level for determining when the job should be scheduled. Fixes #484.
@bgentry thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the docs, the worker args should be able to provide default insert options by implementing the InsertOps function. This includes the
ScheduledAt
attribute. The comments/docs indicate the scheduled at is normally meant to be provided explicitly, however it should work both ways (because docs say it will work).However, my reading of client.go (see link) shows that the scheduled at insert options is only respected when passed explicitly on insert. The
ScheduledAt
field is ignored when coming from InsertOps function on the args being inserted.https://github.com/riverqueue/river/blob/v0.10.1/client.go#L1212
My work-around is to call InsertOpts() on the args explicitly and pass a reference on every insert
The text was updated successfully, but these errors were encountered: