Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed May 20, 2024
1 parent 061b422 commit 7cf2191
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions motleycrew/caching/http_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
try:
from lunary import track_event, run_ctx, event_queue_ctx

is_update_lunary_event = True
do_update_lunary_event = True
except ImportError:
track_event = None
run_ctx = None
event_queue_ctx = None
is_update_lunary_event = False
do_update_lunary_event = False


from motleycrew.common.enums import LunaryEventName, LunaryRunType
Expand Down Expand Up @@ -186,7 +186,7 @@ def get_response(self, func: Callable, *args, **kwargs) -> Any:
# If cache exists, load and return it
result = self.load_cache_response(cache_file, url)
if result is not None:
if is_update_lunary_event:
if do_update_lunary_event:
self._update_lunary_event(run_ctx.get())
return result

Expand All @@ -206,7 +206,7 @@ async def aget_response(self, func: Callable, *args, **kwargs) -> Any:
# If cache exists, load and return it
result = self.load_cache_response(cache_file, url)
if result is not None:
if is_update_lunary_event:
if do_update_lunary_event:
self._update_lunary_event(run_ctx.get())
return result

Expand All @@ -222,7 +222,7 @@ def _update_lunary_event(
) -> None:
"""Updating lunary event"""

if not is_update_lunary_event:
if not do_update_lunary_event:
return

event_params = {
Expand Down

0 comments on commit 7cf2191

Please sign in to comment.