diff --git a/extensions/mentions/src/Job/SendMentionsNotificationsJob.php b/extensions/mentions/src/Job/SendMentionsNotificationsJob.php index f3ed2d7b09..e86924de1f 100644 --- a/extensions/mentions/src/Job/SendMentionsNotificationsJob.php +++ b/extensions/mentions/src/Job/SendMentionsNotificationsJob.php @@ -47,6 +47,8 @@ class SendMentionsNotificationsJob extends AbstractJob public function __construct(CommentPost $post, array $userMentions, array $postMentions, array $groupMentions) { + parent::__construct(); + $this->post = $post; $this->userMentions = $userMentions; $this->postMentions = $postMentions; diff --git a/extensions/package-manager/src/Job/ComposerCommandJob.php b/extensions/package-manager/src/Job/ComposerCommandJob.php index 8cd4900180..b01dda90a6 100644 --- a/extensions/package-manager/src/Job/ComposerCommandJob.php +++ b/extensions/package-manager/src/Job/ComposerCommandJob.php @@ -32,6 +32,8 @@ class ComposerCommandJob extends AbstractJob implements ShouldBeUnique public function __construct(AbstractActionCommand $command, string $phpVersion) { + parent::__construct(); + $this->command = $command; $this->phpVersion = $phpVersion; } diff --git a/extensions/pusher/src/SendPusherNotificationsJob.php b/extensions/pusher/src/SendPusherNotificationsJob.php index def83ca28f..b52b2bbd42 100644 --- a/extensions/pusher/src/SendPusherNotificationsJob.php +++ b/extensions/pusher/src/SendPusherNotificationsJob.php @@ -28,6 +28,8 @@ class SendPusherNotificationsJob extends AbstractJob public function __construct(BlueprintInterface $blueprint, array $recipients) { + parent::__construct(); + $this->blueprint = $blueprint; $this->recipients = $recipients; } diff --git a/framework/core/src/Mail/Job/SendRawEmailJob.php b/framework/core/src/Mail/Job/SendRawEmailJob.php index 9eebc35e68..d3e76358b6 100644 --- a/framework/core/src/Mail/Job/SendRawEmailJob.php +++ b/framework/core/src/Mail/Job/SendRawEmailJob.php @@ -21,6 +21,8 @@ class SendRawEmailJob extends AbstractJob public function __construct(string $email, string $subject, string $body) { + parent::__construct(); + $this->email = $email; $this->subject = $subject; $this->body = $body; diff --git a/framework/core/src/Notification/Job/SendEmailNotificationJob.php b/framework/core/src/Notification/Job/SendEmailNotificationJob.php index 68bffeb17f..d973c55cf1 100644 --- a/framework/core/src/Notification/Job/SendEmailNotificationJob.php +++ b/framework/core/src/Notification/Job/SendEmailNotificationJob.php @@ -28,6 +28,8 @@ class SendEmailNotificationJob extends AbstractJob public function __construct(MailableInterface $blueprint, User $recipient) { + parent::__construct(); + $this->blueprint = $blueprint; $this->recipient = $recipient; } diff --git a/framework/core/src/Notification/Job/SendNotificationsJob.php b/framework/core/src/Notification/Job/SendNotificationsJob.php index f33fda7afa..f6838c39fd 100644 --- a/framework/core/src/Notification/Job/SendNotificationsJob.php +++ b/framework/core/src/Notification/Job/SendNotificationsJob.php @@ -28,6 +28,8 @@ class SendNotificationsJob extends AbstractJob public function __construct(BlueprintInterface $blueprint, array $recipients = []) { + parent::__construct(); + $this->blueprint = $blueprint; $this->recipients = $recipients; } diff --git a/framework/core/src/Queue/AbstractJob.php b/framework/core/src/Queue/AbstractJob.php index 6ec8235a8c..bfc4331bb7 100644 --- a/framework/core/src/Queue/AbstractJob.php +++ b/framework/core/src/Queue/AbstractJob.php @@ -19,4 +19,14 @@ class AbstractJob implements ShouldQueue use InteractsWithQueue; use Queueable; use SerializesModels; + + public static ?string $onQueue = null; + + public function __construct() + { + if (static::$onQueue) { + $this->onQueue(static::$onQueue); + } + } + } diff --git a/framework/core/src/User/Job/RequestPasswordResetJob.php b/framework/core/src/User/Job/RequestPasswordResetJob.php index 5399532d75..74f4d2a8d4 100644 --- a/framework/core/src/User/Job/RequestPasswordResetJob.php +++ b/framework/core/src/User/Job/RequestPasswordResetJob.php @@ -27,6 +27,8 @@ class RequestPasswordResetJob extends AbstractJob public function __construct(string $email) { + parent::__construct(); + $this->email = $email; }