Skip to content

Commit

Permalink
skip failed loop for now (jupyter-server#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer authored and GitHub Enterprise committed Apr 27, 2022
1 parent fc765a5 commit 698f147
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions data_studio_jupyter_extensions/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@
async def fetch_running_kernels(self) -> None:
"""Fetch kernels from the remote kernel service"""
nbservice_client = NotebookServiceClient.instance()
response = await nbservice_client.list_kernels()
kernels = json_decode(response.body)
# Hydrate kernelmanager for all remote kernels
for item in kernels:
kernel = self.kernel_record_class(process_id=item["id"], alive=True)
self._kernel_records.update(kernel)
try:
response = await nbservice_client.list_kernels()
kernels = json_decode(response.body)
# Hydrate kernelmanager for all remote kernels
for item in kernels:
kernel = self.kernel_record_class(process_id=item["id"], alive=True)
self._kernel_records.update(kernel)
except Exception as err:
self.log.debug(
f"Synchronizer failed. Skipping for now. Here is the following error: {str(err)}"
)


DS_JUPYTER_SERVER_CONFIG_OVERRIDES = Config(
Expand Down Expand Up @@ -233,7 +238,7 @@ def _jupyter_server_config(self):
config = super()._jupyter_server_config()
parsed_uri = urlparse(self.dsw_url)
domain = "{uri.scheme}://{uri.netloc}".format(uri=parsed_uri)
log_level = os.environ.get("LOG_LEVEL", "DEBUG")
log_level = os.environ.get("LOG_LEVEL", "INFO")

# Apply defaults from this extension
base_config = DS_JUPYTER_SERVER_CONFIG_OVERRIDES
Expand Down

0 comments on commit 698f147

Please sign in to comment.