Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Notification events should use SerializesModels #24350

Closed
hotmeteor opened this issue May 28, 2018 · 2 comments
Closed

All Notification events should use SerializesModels #24350

hotmeteor opened this issue May 28, 2018 · 2 comments

Comments

@hotmeteor
Copy link
Contributor

hotmeteor commented May 28, 2018

  • Laravel Version: 5.6
  • PHP Version: 7.1
  • Database Driver & Version: all

Description:

All Notification events (NotificationSending, NotificationSent, NotificationFailed) should use SerializesModels like BroadcastNotificationCreated does.

Sometimes the $notifiable model has a bunch of extra stuff on it (relationships, etc) added during a flow and is being unnecessary added to queued jobs from the listeners. This has caused issues for our queueing system because the jobs can have huge payloads.

Steps To Reproduce:

Send a notification using a notifiable with a lot of loaded relational data. See your queued listener jobs get huge.

@tillkruss
Copy link
Contributor

Feel free to submit a PR.

@hotmeteor
Copy link
Contributor Author

Submitted: #24368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants