Skip to content

Commit

Permalink
update meta and tree apis
Browse files Browse the repository at this point in the history
  • Loading branch information
jstzwj committed Aug 15, 2024
1 parent 01ff9d6 commit 13933f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions olah/proxy/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from olah.utils.file_utils import make_dirs


async def meta_cache_generator(app: FastAPI, save_path: str):
async def _meta_cache_generator(save_path: str):
yield {}
with open(save_path, "rb") as f:
while True:
Expand Down Expand Up @@ -72,7 +72,7 @@ async def meta_proxy_cache(
)


async def meta_proxy_generator(
async def _meta_proxy_generator(
app: FastAPI,
headers: Dict[str, str],
meta_url: str,
Expand Down Expand Up @@ -132,10 +132,10 @@ async def meta_generator(
)
# proxy
if use_cache:
async for item in meta_cache_generator(app, save_path):
async for item in _meta_cache_generator(save_path):
yield item
else:
async for item in meta_proxy_generator(
async for item in _meta_proxy_generator(
app, headers, meta_url, allow_cache, save_path
):
yield item
8 changes: 4 additions & 4 deletions olah/proxy/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from olah.utils.file_utils import make_dirs


async def tree_cache_generator(save_path: str):
async def _tree_cache_generator(save_path: str):
yield {}
with open(save_path, "rb") as f:
while True:
Expand Down Expand Up @@ -70,7 +70,7 @@ async def tree_proxy_cache(
)


async def tree_proxy_generator(
async def _tree_proxy_generator(
app: FastAPI,
headers: Dict[str, str],
tree_url: str,
Expand Down Expand Up @@ -128,10 +128,10 @@ async def tree_generator(
)
# proxy
if use_cache:
async for item in tree_cache_generator(app, save_path):
async for item in _tree_cache_generator(save_path):
yield item
else:
async for item in tree_proxy_generator(
async for item in _tree_proxy_generator(
app, headers, tree_url, allow_cache, save_path
):
yield item

0 comments on commit 13933f3

Please sign in to comment.