From a9b1ef7473ff01c16db9e0fc07fffc04ea8bffab Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Fri, 3 Nov 2023 11:36:34 +0100 Subject: [PATCH] Daily start of the fill annotation with a smaller batch size Start the day with a smaller batch size and switch to a bigger one after 1 hour. Run the task every 3 minutes instead of 4. --- h_periodic/h_beat.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/h_periodic/h_beat.py b/h_periodic/h_beat.py index 8714447..3a5ab79 100644 --- a/h_periodic/h_beat.py +++ b/h_periodic/h_beat.py @@ -52,11 +52,17 @@ "schedule": timedelta(minutes=1), "kwargs": {"limit": 400}, }, + "fill-annotation-slim-first-batch": { + "options": {"expires": 30}, + "task": "h.tasks.annotations.fill_annotation_slim", + "schedule": crontab(hour="8", minute="*/3"), + "kwargs": {"batch_size": 500}, + }, "fill-annotation-slim": { "options": {"expires": 30}, "task": "h.tasks.annotations.fill_annotation_slim", - "schedule": crontab(hour="9-13", minute="*/4"), - "kwargs": {"batch_size": 1000}, + "schedule": crontab(hour="9-13", minute="*/3"), + "kwargs": {"batch_size": 1500}, }, "report-sync-annotations-queue-length": { "options": {"expires": 30},