Skip to content

Commit

Permalink
fix: cold start time down to 1 second
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Aug 30, 2024
1 parent 07256ac commit 9faa80c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/data_hub/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def dynamic_function(
**kwargs,
):
if client is None:
client = _get_default_client(debug=debug)
client = _get_default_client(
debug=debug,
refresh=False,
)
method = _get_method(client, method_path)
# call the low level API method

Expand All @@ -132,6 +135,7 @@ def dynamic_function(
tokens["access"] = auth.refresh_tokens(tokens["refresh"])
auth.cache_tokens(tokens)
client.token = tokens["access"]
method = _get_method(client, method_path)
response = method(**kwargs)
else:
raise error
Expand Down
1 change: 0 additions & 1 deletion src/data_hub/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _repr_html_(self):
# extract org name from url
try:
url_parts = url.split("/")
print(url_parts.index("org"))
org_name = url_parts[url_parts.index("org") + 1]
except Exception:
org_name = ""
Expand Down

0 comments on commit 9faa80c

Please sign in to comment.