Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the since/until parameters for H slim task #386

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having these here will make it easier to make follow up PRs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress so far

SLIM_TASK_UNTIL = "2018-03-31"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include a few more months worth of annotations in the window over the default value.


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"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this from 3 -> 2 to be inline with the one below.

"kwargs": {
"batch_size": 250,
"since": SLIM_TASK_SINCE,
"until": SLIM_TASK_UNTIL,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
},
"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