mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Try to better handle slack “too many requests” issue
This commit is contained in:
parent
b5acca89d7
commit
bcad49ce79
|
@ -165,14 +165,24 @@ trait Loggable
|
||||||
$checkinClass = null;
|
$checkinClass = null;
|
||||||
|
|
||||||
if (method_exists($target, 'notify')) {
|
if (method_exists($target, 'notify')) {
|
||||||
|
try {
|
||||||
$target->notify(new static::$checkinClass($params));
|
$target->notify(new static::$checkinClass($params));
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Log::debug($e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send to the admin, if settings dictate
|
// Send to the admin, if settings dictate
|
||||||
$recipient = new \App\Models\Recipients\AdminRecipient();
|
$recipient = new \App\Models\Recipients\AdminRecipient();
|
||||||
|
|
||||||
if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
|
if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
|
||||||
|
try {
|
||||||
$recipient->notify(new static::$checkinClass($params));
|
$recipient->notify(new static::$checkinClass($params));
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Log::debug($e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $log;
|
return $log;
|
||||||
|
|
Loading…
Reference in a new issue