-
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
Conversation
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.
@@ -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 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.
@@ -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 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.
"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 comment
The 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
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Progress so far
@@ -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" |
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.
Include a few more months worth of annotations in the window over the default value.
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.