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

Site await site.start() but doesn't await a future when to stop... I #8

Open
llacroix opened this issue Feb 27, 2020 · 0 comments
Open

Comments

@llacroix
Copy link
Owner

Describe the bug
It's a bug because the endpoint only block because the docker endpoint blocks too. In reality the server endpoint returns from await site.start().

Additional context

We should use a future to await. This way we can trigger a stop on the web endpoint, properly cleanup and also stop the docker endpoint. It's also possible we can completely test the main after those changes are made. Currently the run_until prevent testing completely the main as there's no way to finish the jobs. With that in mind, we can run_until and trigger an even that will trigger a shutdown. For example, checking for SIGTERM signal or SIGHUP. When the signal handler is called even from the tests, it will be possible to increase the code coverage in theory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant