MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / get_db_list

Function get_db_list

tools/sgcollect.py:537–550  ·  view source on GitHub ↗
(sg_url: str, auth_headers: dict[str, str])

Source from the content-addressed store, hash-verified

535
536
537def get_db_list(sg_url: str, auth_headers: dict[str, str]) -> list[str]:
538 # build url to _all_dbs
539 all_dbs_url = "{0}/_all_dbs".format(sg_url)
540 data: list[str] = []
541
542 # get content and parse into json
543 try:
544 response = urlopen(all_dbs_url, auth_headers)
545 data = json.load(response)
546 except urllib.error.URLError as e:
547 print(f"WARNING: Unable to connect to Sync Gateway: {sg_url} {e}")
548
549 # return list of dbs
550 return data
551
552
553# Startup config

Callers 1

make_config_tasksFunction · 0.85

Calls 2

urlopenFunction · 0.90
loadMethod · 0.45

Tested by

no test coverage detected