From 8c005b347dd28b19631fdbda1187f74a396ad07b Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Mon, 4 Sep 2023 17:24:54 +0200 Subject: [PATCH] Add the schedule for h.tasks.annotations.fill_pk_and_user_id Start running it every hour between 8 and 1O UTC with a batch of 1000. We can modify accordingly later after seeing real performance numbers in production. --- 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..291260a 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-annotations-pk": { + "options": {"expires": 30}, + "task": "h.tasks.annotations.fill_pk_and_user_id", + "schedule": crontab(hour="*,10-14", minute=0), + "kwargs": {"batch_size": 1000}, + }, "report-sync-annotations-queue-length": { "options": {"expires": 30}, "task": "h.tasks.indexer.report_job_queue_metrics",