Skip to content

A free open source IT asset/license management system

Change default queue, make all notifications queable.

Brady Wetheringtone6ac60e6baf9
diff --git a/app/Notifications/AcceptanceItemAcceptedNotification.php b/app/Notifications/AcceptanceItemAcceptedNotification.php
index 5ef940918f..b6127e985c 100644
--- a/app/Notifications/AcceptanceItemAcceptedNotification.php
+++ b/app/Notifications/AcceptanceItemAcceptedNotification.php
@@ -5,12 +5,13 @@ namespace App\Notifications;
use AllowDynamicProperties;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class AcceptanceItemAcceptedNotification extends Notification
+class AcceptanceItemAcceptedNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/AcceptanceItemAcceptedToUserNotification.php b/app/Notifications/AcceptanceItemAcceptedToUserNotification.php
index 865539b303..79f5092f65 100644
--- a/app/Notifications/AcceptanceItemAcceptedToUserNotification.php
+++ b/app/Notifications/AcceptanceItemAcceptedToUserNotification.php
@@ -6,12 +6,13 @@ use AllowDynamicProperties;
use App\Helpers\Helper;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class AcceptanceItemAcceptedToUserNotification extends Notification
+class AcceptanceItemAcceptedToUserNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/AcceptanceItemDeclinedNotification.php b/app/Notifications/AcceptanceItemDeclinedNotification.php
index 6c585893b9..ce89400ad0 100644
--- a/app/Notifications/AcceptanceItemDeclinedNotification.php
+++ b/app/Notifications/AcceptanceItemDeclinedNotification.php
@@ -4,12 +4,13 @@ namespace App\Notifications;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class AcceptanceItemDeclinedNotification extends Notification
+class AcceptanceItemDeclinedNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/AuditNotification.php b/app/Notifications/AuditNotification.php
index 33b35e7ed4..12f773a87a 100644
--- a/app/Notifications/AuditNotification.php
+++ b/app/Notifications/AuditNotification.php
@@ -5,6 +5,7 @@ namespace App\Notifications;
use AllowDynamicProperties;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class AuditNotification extends Notification
+class AuditNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.php
index 16c82e4379..2262ba88cc 100644
--- a/app/Notifications/CheckinAccessoryNotification.php
+++ b/app/Notifications/CheckinAccessoryNotification.php
@@ -6,6 +6,7 @@ use App\Models\Accessory;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckinAccessoryNotification extends Notification
+class CheckinAccessoryNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php
index 43f1aa8414..7f4f5da778 100644
--- a/app/Notifications/CheckinAssetNotification.php
+++ b/app/Notifications/CheckinAssetNotification.php
@@ -7,6 +7,7 @@ use App\Models\Asset;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -21,7 +22,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckinAssetNotification extends Notification
+class CheckinAssetNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckinComponentNotification.php b/app/Notifications/CheckinComponentNotification.php
index 309815b66d..55d672d942 100644
--- a/app/Notifications/CheckinComponentNotification.php
+++ b/app/Notifications/CheckinComponentNotification.php
@@ -6,6 +6,7 @@ use App\Models\Component;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckinComponentNotification extends Notification
+class CheckinComponentNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckinLicenseSeatNotification.php b/app/Notifications/CheckinLicenseSeatNotification.php
index 754c79f8ee..b655128cd5 100644
--- a/app/Notifications/CheckinLicenseSeatNotification.php
+++ b/app/Notifications/CheckinLicenseSeatNotification.php
@@ -6,6 +6,7 @@ use App\Models\LicenseSeat;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckinLicenseSeatNotification extends Notification
+class CheckinLicenseSeatNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckoutAccessoryNotification.php b/app/Notifications/CheckoutAccessoryNotification.php
index f16cab5877..465c6e96ad 100644
--- a/app/Notifications/CheckoutAccessoryNotification.php
+++ b/app/Notifications/CheckoutAccessoryNotification.php
@@ -6,6 +6,7 @@ use App\Models\Accessory;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -21,7 +22,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class CheckoutAccessoryNotification extends Notification
+class CheckoutAccessoryNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php
index 38b346f394..7670275cd7 100644
--- a/app/Notifications/CheckoutAssetNotification.php
+++ b/app/Notifications/CheckoutAssetNotification.php
@@ -7,6 +7,7 @@ use App\Models\Asset;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -21,7 +22,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckoutAssetNotification extends Notification
+class CheckoutAssetNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckoutComponentNotification.php b/app/Notifications/CheckoutComponentNotification.php
index 4ad3ab20df..d08c0bcb24 100644
--- a/app/Notifications/CheckoutComponentNotification.php
+++ b/app/Notifications/CheckoutComponentNotification.php
@@ -6,6 +6,7 @@ use App\Models\Component;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckoutComponentNotification extends Notification
+class CheckoutComponentNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckoutConsumableNotification.php b/app/Notifications/CheckoutConsumableNotification.php
index f649b1889a..ba50410285 100644
--- a/app/Notifications/CheckoutConsumableNotification.php
+++ b/app/Notifications/CheckoutConsumableNotification.php
@@ -6,6 +6,7 @@ use App\Models\Consumable;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckoutConsumableNotification extends Notification
+class CheckoutConsumableNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CheckoutLicenseSeatNotification.php b/app/Notifications/CheckoutLicenseSeatNotification.php
index 33b29a248d..78800dc2f4 100644
--- a/app/Notifications/CheckoutLicenseSeatNotification.php
+++ b/app/Notifications/CheckoutLicenseSeatNotification.php
@@ -6,6 +6,7 @@ use App\Models\LicenseSeat;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\SlackWebhookChannel;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -19,7 +20,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
#[AllowDynamicProperties]
-class CheckoutLicenseSeatNotification extends Notification
+class CheckoutLicenseSeatNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/CurrentInventory.php b/app/Notifications/CurrentInventory.php
index 24a6d96794..369a05a6a1 100644
--- a/app/Notifications/CurrentInventory.php
+++ b/app/Notifications/CurrentInventory.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class CurrentInventory extends Notification
+class CurrentInventory extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/ExpectedCheckinAdminNotification.php b/app/Notifications/ExpectedCheckinAdminNotification.php
index ad4089e5a7..45ba6bb333 100644
--- a/app/Notifications/ExpectedCheckinAdminNotification.php
+++ b/app/Notifications/ExpectedCheckinAdminNotification.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class ExpectedCheckinAdminNotification extends Notification
+class ExpectedCheckinAdminNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/ExpectedCheckinNotification.php b/app/Notifications/ExpectedCheckinNotification.php
index 68c6ab679e..4db13b7b85 100644
--- a/app/Notifications/ExpectedCheckinNotification.php
+++ b/app/Notifications/ExpectedCheckinNotification.php
@@ -5,12 +5,13 @@ namespace App\Notifications;
use App\Helpers\Helper;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class ExpectedCheckinNotification extends Notification
+class ExpectedCheckinNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/ExpiringAssetsNotification.php b/app/Notifications/ExpiringAssetsNotification.php
index 0236eb17e3..eb763215e1 100644
--- a/app/Notifications/ExpiringAssetsNotification.php
+++ b/app/Notifications/ExpiringAssetsNotification.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class ExpiringAssetsNotification extends Notification
+class ExpiringAssetsNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/ExpiringLicenseNotification.php b/app/Notifications/ExpiringLicenseNotification.php
index 4453ff3b51..4a377bc252 100644
--- a/app/Notifications/ExpiringLicenseNotification.php
+++ b/app/Notifications/ExpiringLicenseNotification.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class ExpiringLicenseNotification extends Notification
+class ExpiringLicenseNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/FirstAdminNotification.php b/app/Notifications/FirstAdminNotification.php
index 038571a1be..908f20ec2f 100644
--- a/app/Notifications/FirstAdminNotification.php
+++ b/app/Notifications/FirstAdminNotification.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class FirstAdminNotification extends Notification
+class FirstAdminNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/InventoryAlert.php b/app/Notifications/InventoryAlert.php
index 5d4baa6bb3..a32b3a4f3e 100644
--- a/app/Notifications/InventoryAlert.php
+++ b/app/Notifications/InventoryAlert.php
@@ -4,12 +4,13 @@ namespace App\Notifications;
use AllowDynamicProperties;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class InventoryAlert extends Notification
+class InventoryAlert extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/MailTest.php b/app/Notifications/MailTest.php
index 104329607a..6b6d7d7e1e 100644
--- a/app/Notifications/MailTest.php
+++ b/app/Notifications/MailTest.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class MailTest extends Notification
+class MailTest extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/RequestAssetCancelation.php b/app/Notifications/RequestAssetCancelation.php
index f1fba45872..9239d4049b 100644
--- a/app/Notifications/RequestAssetCancelation.php
+++ b/app/Notifications/RequestAssetCancelation.php
@@ -4,6 +4,7 @@ namespace App\Notifications;
use App\Helpers\Helper;
use App\Models\Setting;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
@@ -11,7 +12,7 @@ use Illuminate\Support\Facades\Log;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class RequestAssetCancelation extends Notification
+class RequestAssetCancelation extends Notification implements ShouldQueue
{
private $params;
diff --git a/app/Notifications/RequestAssetNotification.php b/app/Notifications/RequestAssetNotification.php
index 0a95ca7413..008e2f71a9 100644
--- a/app/Notifications/RequestAssetNotification.php
+++ b/app/Notifications/RequestAssetNotification.php
@@ -4,13 +4,14 @@ namespace App\Notifications;
use App\Helpers\Helper;
use App\Models\Setting;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class RequestAssetNotification extends Notification
+class RequestAssetNotification extends Notification implements ShouldQueue
{
private $params;
diff --git a/app/Notifications/SendUpcomingAuditNotification.php b/app/Notifications/SendUpcomingAuditNotification.php
index e9c0d93b1f..6efa7f39d7 100644
--- a/app/Notifications/SendUpcomingAuditNotification.php
+++ b/app/Notifications/SendUpcomingAuditNotification.php
@@ -3,12 +3,13 @@
namespace App\Notifications;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class SendUpcomingAuditNotification extends Notification
+class SendUpcomingAuditNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/app/Notifications/WelcomeNotification.php b/app/Notifications/WelcomeNotification.php
index aa1398a93b..4997ce183c 100644
--- a/app/Notifications/WelcomeNotification.php
+++ b/app/Notifications/WelcomeNotification.php
@@ -4,13 +4,14 @@ namespace App\Notifications;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Password;
use Symfony\Component\Mime\Email;
#[AllowDynamicProperties]
-class WelcomeNotification extends Notification
+class WelcomeNotification extends Notification implements ShouldQueue
{
use Queueable;
diff --git a/config/queue.php b/config/queue.php
index 25ea5a8193..02f54c3c11 100644
--- a/config/queue.php
+++ b/config/queue.php
@@ -13,7 +13,7 @@ return [
|
*/
- 'default' => env('QUEUE_CONNECTION', 'sync'),
+ 'default' => env('QUEUE_CONNECTION', 'background'),
/*
|--------------------------------------------------------------------------