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

Implement stop_extension() #448

Closed
dlqqq opened this issue Nov 8, 2023 · 1 comment · Fixed by #565
Closed

Implement stop_extension() #448

dlqqq opened this issue Nov 8, 2023 · 1 comment · Fixed by #565
Labels
bug Something isn't working

Comments

@dlqqq
Copy link
Member

dlqqq commented Nov 8, 2023

Description

Currently AiExtension does not implement the async stop_extension() method. This is causing the server to take much longer than it usually does to stop. When I add this block:

    async def stop_extension(self):
        if 'dask_client_future' in self.settings:
            dask_client: DaskClient = await self.settings['dask_client_future']
            await dask_client.close()

The server stops considerably faster. However, if an exception is raised in this block, then the server refuses to stop without kill -9 <PID>.

We need to determine 1) what else needs to be done (if anything) in this method, and 2) how to safely implement this method and handle exceptions.

@dlqqq dlqqq added the bug Something isn't working label Nov 8, 2023
@dlqqq
Copy link
Member Author

dlqqq commented Nov 8, 2023

Also curious as to how Jupyter Server stops an extension that does not implement stop_extension().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant