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

Handle exceptions in the load_session #1385

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion enterprise_gateway/services/kernels/remotemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ def check_kernel_id(self, kernel_id: str) -> None:

def _refresh_kernel(self, kernel_id: str) -> bool:
if self.parent.availability_mode == EnterpriseGatewayConfigMixin.AVAILABILITY_REPLICATION:
self.parent.kernel_session_manager.load_session(kernel_id)
try:
self.parent.kernel_session_manager.load_session(kernel_id)
except Exception as e:
self.log.error(f"Failed to load session, kernel_id:{kernel_id}", e)
return False
return self.parent.kernel_session_manager.start_session(kernel_id)
# else we should throw 404 when not using an availability mode of 'replication'
return False
Expand Down
Loading