-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support queue.failer service to record failed jobs in mongo #739
Conversation
@@ -33,5 +33,16 @@ public function register() | |||
return new MongoConnector($this->app['db']); | |||
}); | |||
}); | |||
|
|||
// Support queue failer to record failed jobs | |||
$this->app->singleton('queue.failer', function ($app) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overwrites a Laravel component and will probably break applications if they are using a different queue backend, right?
If there is no other way to extend, and overwriting is the only way, then this should be in a separate service provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
luckily they have an interface there Illuminate\Queue\Failed\FailedJobProviderInterface
, so as long as the implemented failer class can handle writing / reading with their expected data format, it will just work, i tested with Amazon SQS on queue:failed, queue:failed-table, queue:flush, queue:forget, queue:retry, queue:work
, it works good.
but i do get your concern, will try digging more to see if there's any better way to inject 'queue.failer' more graceful
What is actually broken in |
hi @jenssegers , laravel stock |
Any merge ? |
I think that this issues is not actual |
Yeah, not actual, 4 years has passed, closing. |
queue.failer
in laravel: https://github.com/laravel/framework/blob/4.2/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php)