mlntn / laravel-unique-queue

Laravel queue driver that prevents identical jobs from being queued
15 stars 8 forks source link

Allow unique and non-unique together #6

Open royduin opened 4 years ago

royduin commented 4 years ago

In the Horizon config I've:

'queue' => ['default', 'low'],
'balance' => false,

So first everything in the default queue will be handled. When it's empty the low queue will be processed. Now I only like to "uniquely" queued listeners on the low queue. That's currently not possible because "uniquely" works with a custom connection. It would be awesome to have a job/listener implement an interface (I think that's better in this case in comparison with a trait currently used) and depending on that it will be "uniquelied".