Skip to content

Commit

Permalink
fix: offline cache expire (#3720)
Browse files Browse the repository at this point in the history
  • Loading branch information
numb3r3 committed Oct 20, 2021
1 parent 05977b9 commit c8fa709
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jina/hubble/hubio.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ def fetch_meta(
The `name` and `tag` should be passed via ``args`` and `force` and `secret` as ``kwargs``, otherwise,
cache does not work.
"""

with ImportExtensions(required=True):
import requests

Expand Down Expand Up @@ -732,6 +731,11 @@ def pull(self) -> str:
need_pull = True

if need_pull:
# pull the latest executor meta, as the cached data would expire
executor = HubIO.fetch_meta(
name, tag, secret=secret, force=True
)

cache_dir = Path(
os.environ.get(
'JINA_HUB_CACHE_DIR',
Expand Down

0 comments on commit c8fa709

Please sign in to comment.