From 22c5eb020853ccef7c5406321ca79a45c3cb8ff1 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Wed, 20 Mar 2024 06:24:53 -0300 Subject: [PATCH] fix: retry index tasks --- bd_api/apps/api/v1/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bd_api/apps/api/v1/tasks.py b/bd_api/apps/api/v1/tasks.py index 3886df34..427bd3a4 100644 --- a/bd_api/apps/api/v1/tasks.py +++ b/bd_api/apps/api/v1/tasks.py @@ -17,13 +17,13 @@ logger = logger.bind(module="api.v1") -@periodic_task(crontab(day_of_week="1-6", hour="5", minute="0")) +@periodic_task(crontab(day_of_week="1-6", hour="5", minute="0"), retries=3, retry_delay=60) @production_task def update_search_index_task(): call_command("update_index", batchsize=100) -@periodic_task(crontab(day_of_week="0", hour="5", minute="0")) +@periodic_task(crontab(day_of_week="0", hour="5", minute="0"), retries=3, retry_delay=60) @production_task def rebuild_search_index_task(): call_command("rebuild_index", interactive=False, batchsize=100)