Skip to content

Commit

Permalink
Include the since/until parameters for H slim task
Browse files Browse the repository at this point in the history
The dates here take into account the progress made so far and move the
window forward a few months to see the impact on performance.

In theory a very big window will degrade performance significantly as it
will need to visit more annotations.
  • Loading branch information
marcospri committed Nov 16, 2023
1 parent 0179909 commit 3014340
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions h_periodic/h_beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
print("h_beat disabled by DISABLE_H_BEAT environment variable")
sys.exit()

SLIM_TASK_SINCE = "2016-01-01"
SLIM_TASK_UNTIL = "2018-03-31"

celery = Celery("h")
celery.conf.update(
beat_schedule_filename="h-celerybeat-schedule",
Expand Down Expand Up @@ -55,14 +58,22 @@
"fill-annotation-slim-first-batch": {
"options": {"expires": 30},
"task": "h.tasks.annotations.fill_annotation_slim",
"schedule": crontab(hour="7", minute="*/3"),
"kwargs": {"batch_size": 250},
"schedule": crontab(hour="7", minute="*/2"),
"kwargs": {
"batch_size": 250,
"since": SLIM_TASK_SINCE,
"until": SLIM_TASK_UNTIL,
},
},
"fill-annotation-slim": {
"options": {"expires": 30},
"task": "h.tasks.annotations.fill_annotation_slim",
"schedule": crontab(hour="8-15", minute="*/2"),
"kwargs": {"batch_size": 3000},
"kwargs": {
"batch_size": 3000,
"since": SLIM_TASK_SINCE,
"until": SLIM_TASK_UNTIL,
},
},
"report-sync-annotations-queue-length": {
"options": {"expires": 30},
Expand Down

0 comments on commit 3014340

Please sign in to comment.