You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, is there a way to stop the worker upon request? Right now, I traverse through a beacon to find the worker and schedule its shutdown, but is there a better way?
The program above raising CancelledError works for me, it pretty much just exits (mode master)
I agree using the beacon to stop is not very great, I guess the best way is if you have a reference
to the worker already.
You can stop the worker, but you can also stop the service passed to Worker(): that's what we do in Faust. We have an App class that starts all the services needed, and call app.stop() to stop the worker (the app is also passed pretty much everywhere, if you don't like passing you could use dependency injection or a Local (mode.locals).
Checklist
master
branch of Mode.Steps to reproduce
Have a
Service
with a canceled background task wrapped intoWorker
:Expected behavior
A task's
CancelledError
can be propagated to the worker.Actual behavior
An application seems stuck and unresponsive.
Full traceback
Versions
The text was updated successfully, but these errors were encountered: