Skip to content
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

Early shutdown not working due to switch to asyncio signal handler #205

Open
michaelweiser opened this issue Mar 21, 2022 · 1 comment
Open
Assignees
Labels
Milestone

Comments

@michaelweiser
Copy link
Contributor

Because we needed to switch the signal handler to asyncio in 9051be9, retries in cuckoo and cortex connectivity checks can no longer be aborted and shutdown will only happen after the retries have been exhausted. This is likely due to the asyncio event loop not even running while the toolbox modules initialise. So we'd need to either switch them to asyncio as well or defer their startup into separate threads.

@michaelweiser michaelweiser added this to the 2.2 milestone Mar 21, 2022
@michaelweiser michaelweiser self-assigned this Mar 21, 2022
@michaelweiser
Copy link
Contributor Author

Mitigated by switch to asyncio and running trackers as tasks and cancelling them on shutdown, e.g. https://github.com/michaelweiser/PeekabooAV/blob/1cfeb528facd244002238bd0a8cd17c8cf9882de/peekaboo/toolbox/cortex.py#L817 (apart from dropping startup connectivity checks altogether).

@michaelweiser michaelweiser mentioned this issue Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant