Skip to content

how is a river job marked completed? (when not transactional job completion) #564

Closed Answered by bgentry
geekodour asked this question in Q&A
Discussion options

You must be logged in to vote

The "completer" concept is there to mark jobs complete outside of the main execution / Work() function call. In the normal case this is done async from the job itself finishing, and furthermore it is batched to significantly improve total throughput.

The design for River is at-least-once so you always need to be prepared for your jobs to potentially attempt execution more than once. In practice it should be very rare for a job to finish executing but fail to have its result saved to the database. In cases where you want to be sure this does not happen (say you are making other related database changes anyway) you can use JobCompleteTx to ensure that those changes happen atomically with th…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by bgentry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants