Skip to content

Updating job metadata while running #164

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

You must be logged in to vote

Hi @atoi, good question. If you’re going to do this yourself anyway (presumably as a query invoked within the job) the safer thing to do is probably to update the job’s args instead. That also feels more appropriate in this case because it sounds like this is a job-specific value that you’re tracking, whereas metadata is going to be used more for layered on functionality that isn’t job-specific.

You can use jsonb operators to safely access/set subfields within your json structure. Up to you of course not to accidentally clobber your existing args 😆 As long as your args struct includes something like a progress field you should be able to safely update it at the end of the job before retur…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@atoi
Comment options

@atoi
Comment options

@bgentry
Comment options

@atoi
Comment options

@vsoch
Comment options

Answer selected by atoi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #163 on January 19, 2024 13:39.