Closed nuelsoft closed 3 months ago
It would be sufficient if pg-boss allows passing an id
to send()
instead of pg-boss generating a uuid.
Without being able to set IDs ourselves, we currently have to maintain a separate table to map IDs.
This would be a good option to send(). You can use insert([jobs]) for now, however.
Thanks @timgit! insert()
does what we need. And thank you for the work on this lib :)
Hello @timgit, thank you for the pointer. I was more worried by this https://github.com/timgit/pg-boss/blob/64df1e471fdd44469702467ff09420c7396ba685/src/plans.js#L138
It would be nice to maybe drop the type from uuid to a more flexible string.
Thanks again.
send()
now supports an { id }
option in v10
There are cases where an actor would want to replace an already scheduled job. The current solution doesn't allow for this or any kind of job filtering by data jsonb object.
An example use-case
This doesn't have to replace the existing
id
, It should only another possible reference that can be predicted uniquely