-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ | |
print("h_beat disabled by DISABLE_H_BEAT environment variable") | ||
sys.exit() | ||
|
||
SLIM_TASK_SINCE = "2016-01-01" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Progress so far |
||
SLIM_TASK_UNTIL = "2018-03-31" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
@@ -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"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Names match the task parameters: https://github.com/hypothesis/h/blob/main/h/tasks/annotations.py#L9 |
||
}, | ||
}, | ||
"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}, | ||
|
There was a problem hiding this comment.
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.