mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-17 08:20:16 +02:00
Enable caching
This commit is contained in:
parent
ec34d7fd29
commit
f88249c8fc
@ -162,14 +162,11 @@ def _current_notifications() -> dict:
|
|||||||
for hook in hooks:
|
for hook in hooks:
|
||||||
logger.info(hook)
|
logger.info(hook)
|
||||||
try:
|
try:
|
||||||
app_notifications.extend(hook.get_announcement_list())
|
|
||||||
"""
|
|
||||||
app_notifications.extend(cache.get_or_set(
|
app_notifications.extend(cache.get_or_set(
|
||||||
f"{hook.app_name}_notification_issues",
|
f"{hook.app_name}_notification_issues",
|
||||||
hook.get_announcement_list,
|
hook.get_announcement_list,
|
||||||
NOTIFICATION_CACHE_TIME,
|
NOTIFICATION_CACHE_TIME,
|
||||||
))
|
))
|
||||||
"""
|
|
||||||
except requests.HTTPError:
|
except requests.HTTPError:
|
||||||
logger.warning("Error when getting %s notifications", hook, exc_info=True)
|
logger.warning("Error when getting %s notifications", hook, exc_info=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user