I have added an option to Workers and PoolWorkers so they can filter/poll only jobs of specific job types.
This way you can have several pools or services polling from the same queue, and not having to implement all job types or define a handler for unknown types. (specially if a new type is added later on)
Also, with this implementation workers will not lock unsupported jobs, blocking other workers that can process those jobs/rows.
I've created some functions to generate the final queries using constants, as the queries are not static anymore.
PS: If this gets merged, README/examples/documentation might need to be updated. Although the signatures are not changed and is fully compatible with the previous version.
I have added an option to Workers and PoolWorkers so they can filter/poll only jobs of specific job types. This way you can have several pools or services polling from the same queue, and not having to implement all job types or define a handler for unknown types. (specially if a new type is added later on)
Also, with this implementation workers will not lock unsupported jobs, blocking other workers that can process those jobs/rows.
There is more info in this issue: https://github.com/vgarvardt/gue/issues/291
I've created some functions to generate the final queries using constants, as the queries are not static anymore.
PS: If this gets merged, README/examples/documentation might need to be updated. Although the signatures are not changed and is fully compatible with the previous version.