From cb8472d669f50d2dfc3d9837d6a7049840b08a7a Mon Sep 17 00:00:00 2001 From: Zach Aysan Date: Thu, 15 Aug 2024 06:28:55 -0400 Subject: [PATCH] fix: Make influx cache task recurring (#4495) Co-authored-by: Matthew Elwell --- api/organisations/tasks.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/organisations/tasks.py b/api/organisations/tasks.py index fea2b492cf23..951924fa13ab 100644 --- a/api/organisations/tasks.py +++ b/api/organisations/tasks.py @@ -82,6 +82,14 @@ def send_org_subscription_cancelled_alert( @register_recurring_task( run_every=timedelta(hours=6), ) +def update_organisation_subscription_information_influx_cache_recurring(): + """ + We're redefining the task function here to register a recurring task + since the decorators don't stack correctly. (TODO) + """ + update_organisation_subscription_information_influx_cache() # pragma: no cover + + @register_task_handler() def update_organisation_subscription_information_influx_cache(): subscription_info_cache.update_caches((SubscriptionCacheEntity.INFLUX,))