Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmarkarl committed Nov 9, 2023
1 parent c25a743 commit 1717680
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jupyter_server/gateway/gateway_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,14 +556,18 @@ def load_connection_args(self, **kwargs):
have yet to be initialized, we'll do that here.
"""
self.log.warning("now in load_connection_args")

print("print now in load_connection_args")

if len(self._connection_args) == 0:
self.init_connection_args()

# Give token renewal a shot at renewing the token
prev_auth_token = self.auth_token
try:
self.auth_token = self.gateway_token_renewer.get_token(
self.auth_header_key, self.auth_scheme, self.auth_token, **kwargs
self.auth_header_key, self.auth_scheme, self.auth_token
)
except Exception as ex:
self.log.error(
Expand Down Expand Up @@ -719,6 +723,8 @@ async def _is_retryable(self, method: str, exception: Exception) -> bool:

async def gateway_request(endpoint: str, **kwargs: ty.Any) -> HTTPResponse:
"""Make an async request to kernel gateway endpoint, returns a response"""
print("now in gateway requeest")

kwargs = GatewayClient.instance().load_connection_args(**kwargs)
rhc = RetryableHTTPClient()
try:
Expand Down

0 comments on commit 1717680

Please sign in to comment.