Unserialization fails when constucter parameter given as Model was deleted
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.
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.
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.
we're facing the same issue here, hope the pull request will be merged 'soon' ;)
Closed in https://github.com/thomasjohnkane/snooze/releases/tag/2.7.0 :)