riverqueue / river

Fast and reliable background jobs in Go
https://riverqueue.com
Mozilla Public License 2.0
3.22k stars 86 forks source link

UniqueOpts with ByTags argument #368

Open mobiletoly opened 3 months ago

mobiletoly commented 3 months ago

We do have ByArgs argument in UniqueOpts but unfortunately it is not good enough for my use case to describe uniqueness of the job (because I have different timestamps, requests id etc in job arguments). Is it possible to add something like ByTags to UniqueOpts for more fine-grained uniqueness control?

bgentry commented 3 months ago

@mobiletoly would it work for your use case if you could do uniqueness comparisons against a subset of args (specified by top level JSON field names) instead of all of them? That’s something we’ve talked about before but haven’t yet got around to implementing.

mobiletoly commented 3 months ago

hi @bgentry - yes, it will absolutely work for me.