From 7cad7e7022b743ee297f78bdeda69640599c5204 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Thu, 26 Oct 2023 09:54:30 +0200 Subject: [PATCH] Add task to fill the AnnotationSlim table 4AM UTC seem to be the lowest activity period now, before the report refresh and the backup. Starting with a small batch size. --- h_periodic/h_beat.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/h_periodic/h_beat.py b/h_periodic/h_beat.py index 8159c78..c7637c6 100644 --- a/h_periodic/h_beat.py +++ b/h_periodic/h_beat.py @@ -5,6 +5,7 @@ from os import environ from celery import Celery +from celery.schedules import crontab from h_periodic._util import asbool @@ -51,6 +52,12 @@ "schedule": timedelta(minutes=1), "kwargs": {"limit": 400}, }, + "fill-annotation-slim": { + "options": {"expires": 30}, + "task": "h.tasks.annotations.fill_annotation_slim", + "schedule": crontab(hour="4", minute="*/10"), + "kwargs": {"batch_size": 1000}, + }, "report-sync-annotations-queue-length": { "options": {"expires": 30}, "task": "h.tasks.indexer.report_job_queue_metrics",