Skip to content

Commit

Permalink
Increase monitoring cache duration
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Nov 30, 2023
1 parent eeed979 commit 5bd573a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions archive_query_log/monitoring/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
UrlOffsetParser, WarcQueryParser, WarcSnippetsParser
from archive_query_log.utils.time import utc_now

_CACHE_SECONDS_STATISTICS = 60 * 5 # 5 minutes
_CACHE_SECONDS_PROGRESS = 60 * 10 # 10 minutes


class Statistics(NamedTuple):
name: str
Expand All @@ -35,7 +38,7 @@ class Progress(NamedTuple):
Statistics,
] = ExpiringDict(
max_len=100,
max_age_seconds=15,
max_age_seconds=_CACHE_SECONDS_STATISTICS,
)


Expand Down Expand Up @@ -97,7 +100,7 @@ def _get_statistics(
Progress,
] = ExpiringDict(
max_len=100,
max_age_seconds=15,
max_age_seconds=_CACHE_SECONDS_PROGRESS,
)


Expand Down

0 comments on commit 5bd573a

Please sign in to comment.