Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions exodus_gw/worker/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def urls_for_flush(self):
return out

def do_flush(self, urls: list[str]):
if not self.env.fastpurge_enabled or not urls:
if not self.env.fastpurge_enabled:
LOG.info("fastpurge is not enabled for %s", self.env.name)
return

Expand All @@ -120,14 +120,16 @@ def do_flush(self, urls: list[str]):

def run(self):
urls = self.urls_for_flush
self.do_flush(urls)

LOG.info(
"%s flush of %s URL(s) (%s, ...)",
"Completed" if self.env.fastpurge_enabled else "Skipped",
len(urls),
urls[0] if urls else "<empty>",
)
if urls:
self.do_flush(urls)

LOG.info(
"%s flush of %s URL(s) (%s, ...)",
"Completed" if self.env.fastpurge_enabled else "Skipped",
len(urls),
urls[0],
)


def load_task(db: Session, task_id: str):
Expand Down