Skip to content

Commit dc8fc71

Browse files
committed
Added a check for serverless in the CRDS_SERVER_URL.
1 parent f2bcb95 commit dc8fc71

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

crds/client/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def get_server_info():
472472

473473
@utils.cached
474474
def get_download_metadata():
475-
"Defer and cache decoding of download_metadata field of server info."""
475+
"""Defer and cache decoding of download_metadata field of server info."""
476476
info = get_server_info()
477477
return proxy.crds_decode(info["download_metadata"])
478478

@@ -491,7 +491,10 @@ def _get_server_info():
491491
content = utils.get_uri_content(config_uri)
492492
info = ast.literal_eval(content)
493493
info["status"] = "s3"
494-
info["connected"] = True
494+
if "serverless" in get_crds_server(get_default_observatory()):
495+
info["connected"] = False
496+
else:
497+
info["connected"] = True
495498
elif config_uri != "none":
496499
log.verbose(f"Loading config from URI '{config_uri}'.")
497500
content = utils.get_uri_content(config_uri)

0 commit comments

Comments
 (0)