pg-boss icon indicating copy to clipboard operation
pg-boss copied to clipboard

Feature request: listJobs

Open bgfernandes opened this issue 2 years ago • 1 comments

We are implementing account deletion in a decentralized environment, each service is going to use pg-boss to keep track of it's own account deletion job, and a particular service will be responsible to poll each service for the state of the deletion jobs and keep track of status and/or any error messages.

We would like to use the user_id to fetch the status and possible error messages from each system, in order for the polling service not to have to store job ids for every system (and have to possibly store more in the future, as new services are added), if would be good if we could get a list of jobs with a filter based on the job payload.

Right now our approach is to directly query the DB table that pg-boss stores the jobs.

bgfernandes avatar Apr 20 '23 09:04 bgfernandes

The job payload is jsonb. You could use data->>'userId', for example

timgit avatar May 09 '23 21:05 timgit