-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix missing dispatch WorkerStoppedEvent
after SIGINT
or SIGTERM
#52123
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
Fix missing dispatch WorkerStoppedEvent
after SIGINT
or SIGTERM
#52123
Conversation
@@ -271,6 +272,8 @@ public function handleSignal(int $signal, int|false $previousExitCode = 0): int| | |||
|
|||
$this->worker->stop(); | |||
|
|||
$this->eventDispatcher?->dispatch(new WorkerStoppedEvent($this->worker)); |
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 doesn't look necessary to me. The event should already be dispatched at the end of the Worker::run()
method.
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.
Worker::run()
is not called in the case of SIGINT or SIGTERM
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.
Are you sure that's still the case after the fix from #52080?
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.
i will check that
WorkerStoppedEvent
after SIGINT
or SIGTERM
WorkerStoppedEvent
after SIGINT
or SIGTERM
WorkerStoppedEvent
after SIGINT
or SIGTERM
Any news @Chris53897 ? |
Sorry for late response. I will close this PR. |
Related to #52077
In my point of view this Event should be dispatched here.
But maybe there are reasons for not doing this in the past.
I am not sure if bugfix or new feature.