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

Unserialization fails when constucter parameter given as Model was deleted #132

Open
sakcaysoftware opened this issue Sep 25, 2024 · 1 comment

Comments

@sakcaysoftware
Copy link

Hi there,
We use this package for long times. First of all thanks for this package.

Recently I noticed for an exception called UnserializeFailedException. This exception is thrown because the constucter parameter given as Model was deleted before execution. Laravel offers a property called $deleteWhenMissingModels for notification classes. In case of ModelNotFoundException Laravel deletes the job and terminates execution if this property is set to true.

Code_72ACQ4V02L

Here is the unserialization stage for this package. Exception thrown here because model was deleted before. (Because laravel calls query with firstOrFail()). We can determine a property for this situtation to handle like Laravel.

@sakcaysoftware
Copy link
Author

Accordingly, it tries to resend each time for the time specified in the snooze.sendTolerance config. And as you can guess, an error is thrown for each time and a log is written.

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

1 participant