Replacing a jobs args and schedule #124
Closed
pconstantinou
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@pconstantinou There isn’t any kind of generalized job update API as of now. This also seems like a bit of a specialized use case so it may not be something we get to soon. Based on what you’re describing, you could build a reasonably fast query if you’re filtering on top level args keys using the GIST index. You should be careful to do this transactionally by taking a lock for update on the row you want to update and only continuing if its status is still |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to insert a job and then override it with newer args and an updated schedule.
In the specific use case, I'd like to trigger a long-running remote process with some data. As soon as the data comes to my service, I trigger the job to start in 45 seconds, but if more data comes in, I want to update the arguments and only have the most recent queued item handled.
Does River have that capability? It looks like the first one wins and duplicate inserts are discarded.
Beta Was this translation helpful? Give feedback.
All reactions