You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,35 @@ class Foo extends Command
217
217
}
218
218
```
219
219
220
+
#### Notifications deduplication
221
+
222
+
Often different console commands can produce similar errors. For example, maybe all of your commands are using some common external service. And if that service goes down, you'll get an error notification from each of your commands.
223
+
Or, another example, probably you're using database server. If it goes down - again, you'll get an error notification from each of your commands.
224
+
And this can be a problem, if you have a huge number of commands. You'll get hundreds of emails for a few hours.
225
+
226
+
The good news is that you can deduplicate notifications very easy. You can enable deduplication by overriding `getNotificationDeduplication` method.
227
+
228
+
Also, you can adjust deduplication time, by overridding `getNotificationDeduplicationTime` method:
229
+
230
+
```php
231
+
class Foo extends Command
232
+
{
233
+
use Loggable;
234
+
235
+
protected function getNotificationDeduplication()
236
+
{
237
+
return true;
238
+
}
239
+
240
+
protected function getNotificationDeduplicationTime()
241
+
{
242
+
return 90;
243
+
}
244
+
245
+
// ...
246
+
}
247
+
```
248
+
220
249
#### Notifications mail driver
221
250
222
251
In order to send an email notifications, package would check `mail` configuration of your Laravel project.
@@ -250,35 +279,6 @@ class Foo extends Command
250
279
}
251
280
```
252
281
253
-
#### Notifications deduplication
254
-
255
-
Often different console commands can produce similar errors. For example, maybe all of your commands are using some common external service. And if that service goes down, you'll get an error notification from each of your commands.
256
-
Or, another example, probably you're using database server. If it goes down - again, you'll get an error notification from each of your commands.
257
-
And this can be a problem, if you have a huge number of commands. You'll get hundreds of emails for a few hours.
258
-
259
-
The good news is that you can deduplicate notifications very easy. You can enable deduplication by overriding `getNotificationDeduplication` method.
260
-
261
-
Also, you can adjust deduplication time, by overridding `getNotificationDeduplicationTime` method:
0 commit comments