-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Exit listen action when throw exception #10
Comments
You can use 'queue' => [
'class' => \zhuravljov\yii\queue\Queue::class,
'as log' => \zhuravljov\yii\queue\LogBehavior::class,
], If you need to exit from listening when throw a new exception use 'queue' => [
'class' => \zhuravljov\yii\queue\Queue::class,
'on afterError' => function (\zhuravljov\yii\queue\ErrorEvent $event) {
throw $event->error;
}
], |
@zhuravljov
What can i do? |
Beginning from 0.12.0 a job is executed isolatly in a child process. So a job executing doesn't affect on a listener. I will make separate option that would disable this. For example: php yii queue/listen --isolate=0 |
What is benefits of isolate listener? when job stuck in worker and locked worker? |
Thank you, I waiting for "isolate" option |
Hi
I want exit from listening when throw a new exception in my job and want get errors in error logs not in verbose logs
The text was updated successfully, but these errors were encountered: