Skip to content

Commit

Permalink
Make notifications queueable
Browse files Browse the repository at this point in the history
The VerifyEmail notification is hooked up into the registration
workflow. If this notification fails, the registration fails.
Now the notification is queued and won't make the registration fail.
Instead, the notification may be retried on the queue.
  • Loading branch information
mzur committed Feb 15, 2024
1 parent 0d982ef commit f4e14af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Notifications/Unsubscribed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

namespace Biigle\Modules\Newsletter\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class Unsubscribed extends Notification
class Unsubscribed extends Notification implements ShouldQueue
{
use Queueable;

/**
* Get the notification's delivery channels.
*
Expand Down
6 changes: 5 additions & 1 deletion src/Notifications/VerifyEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@

use Carbon\Carbon;
use Illuminate\Auth\Notifications\VerifyEmail as Base;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use URL;

class VerifyEmail extends Base
class VerifyEmail extends Base implements ShouldQueue
{
use Queueable;

/**
* Get the verify email notification mail message for the given URL.
*
Expand Down

0 comments on commit f4e14af

Please sign in to comment.