Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, hello to all. This is my first contribution to an open source package, so please go easy on me. I'm not a software engineer, never developed professionally, but I dabble a bit in the Laravel ecosystem every now and then.
This being said, my use case is as follows: I have two apps, both using the same database as quite a lot of the data is shared between them and there was no reason to duplicate. The jobs queues are running on database connection. Both apps dispatch and process their own jobs on queues with different names. There is also a
default
queue which is used for processing emails and a few other bits.Long story short: today I ran into the situation where jobs were failing at an alarming rate on one of the apps, with the following error (excerpt):
This seems to happen because the wrong app was processing a job that was found on the
default
queue.So I needed to have a way to somehow tell Slack Alerts that the job needs to be dispatched on a different queue than
default
.The PR introduces a config option
slack-alerts.queue
, which gets its value fromSLACK_ALERT_QUEUE
in.env
.At runtime, the queue can be changed by calling
onQueue()
method.Example: