This updates the job_singleton_queue index to drive the special singleton queue behavior for any singletonKey that starts with__pgboss__singleton_queue--not just equal to it. In effect, this allows multiple singleton queues per job name (see discussion: https://github.com/timgit/pg-boss/discussions/285).
I included the new boolean option useSingletonQueue to prepend the passed singletonKey with __pgboss__singleton_queue. Otherwise, it has no effect.
This should not impact existing behavior UNLESS someone already had a singletonKey that is prepended with __pgboss__singleton_queue but not equal to __pgboss__singleton_queue. That seems highly unlikely.
FYI: I wasn't sure about the appropriate versioning and I had some issues running the CI tests locally. I'll add some comments about that.
This updates the
job_singleton_queue
index to drive the special singleton queue behavior for any singletonKey that starts with__pgboss__singleton_queue
--not just equal to it. In effect, this allows multiple singleton queues per job name (see discussion: https://github.com/timgit/pg-boss/discussions/285).I included the new boolean option
useSingletonQueue
to prepend the passed singletonKey with__pgboss__singleton_queue
. Otherwise, it has no effect.This should not impact existing behavior UNLESS someone already had a singletonKey that is prepended with
__pgboss__singleton_queue
but not equal to__pgboss__singleton_queue
. That seems highly unlikely.FYI: I wasn't sure about the appropriate versioning and I had some issues running the CI tests locally. I'll add some comments about that.