From 18e8927c2158e689227d8266ea7f3ae7dc1416d9 Mon Sep 17 00:00:00 2001 From: ehsang Date: Sat, 7 Dec 2024 20:51:20 +0330 Subject: [PATCH] retialer 403 fix --- say/celery.py | 2 +- say/tasks/update_needs.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/say/celery.py b/say/celery.py index 20e5330e..c61df57c 100644 --- a/say/celery.py +++ b/say/celery.py @@ -23,7 +23,7 @@ }, 'update-needs': { 'task': 'say.tasks.update_needs.update_needs', - 'schedule': crontab(minute=30, hour='0,4,8,12,16,20'), + 'schedule': crontab(minute=30, hour='6,12,16,20'), }, 'report_to_family': { 'task': 'say.tasks.report_to_family.report_to_families', diff --git a/say/tasks/update_needs.py b/say/tasks/update_needs.py index 85143ff5..763d7eb9 100644 --- a/say/tasks/update_needs.py +++ b/say/tasks/update_needs.py @@ -21,8 +21,11 @@ def update_needs(self): ) t = [] + + print(f"Total needs to be updated: {len(needs)}") for need in needs: t.append(need.id) + print(f"updating need: {need.id}") update_need.delay(need.id) return t