Replies: 4 comments
-
Same here. Has tried ShouldBeUnique but not working. Even adding a job() method for specification that will be used when job of notification is constructed will be sufficient I have worked around by using cache, which will be called on queue (I edited the original code, so I cannot guarantee there is no error, but it should give some insights)
And on notification
|
Beta Was this translation helpful? Give feedback.
-
Support this, ran into errors because i assumed this would work. |
Beta Was this translation helpful? Give feedback.
-
Also be good to have this on the Mail class when using ShouldQueue. We seem to be able to add the ShouldBeUnique trait, but can't quire get it working on a Mail object. |
Beta Was this translation helpful? Give feedback.
-
Yea, I think its much-needed thing right now. |
Beta Was this translation helpful? Give feedback.
-
Laravel 8.x supports unique queued jobs via the
ShouldBeUnique
interface. This can be used to avoid duplicating work under various scenarios.Currently there is no similar support for queued notifications. Ideally, I'd like to be able to use the same
ShouldBeUnique
interface and define auniqueId()
method on the notification to provide the unique key. Instead, I have to create a queued job that sends the notification immediately, which seems overly complex.Beta Was this translation helpful? Give feedback.
All reactions