Skip to content

Conversation

thomasleese
Copy link
Contributor

@thomasleese thomasleese commented Apr 7, 2025

We're modifying the way Good Job is deployed to hopefully reduce contention by reducing the number of parallel jobs processing at any one time. This should allow us to reduce the artificial gap we've imposed between PDS jobs and process patients at a quicker rate.

By making the value configurable we can change the gap between jobs without needing to deploy changes to the code.

@thomasleese thomasleese added the operations Improving live support label Apr 7, 2025
@thomasleese thomasleese added this to the v2.1.3 milestone Apr 7, 2025
@benilovj benilovj modified the milestones: v2.1.3, v2.2.0 Apr 7, 2025
Base automatically changed from v2.1.3-wip to main April 8, 2025 08:05
This increases the threshold necessary to trigger a patient to be
updated from PDS from 6 hours since the last update to 12 hours.
Currently it takes about 24 hours to process all patients older than 6
hours, and we expect the number of patients to double in the next couple
of weeks. Combining this change with a decrease in the gap between jobs
should allow us to handle the increase in the number of patients.
Instead of using `each_with_index` we can use `find_each` and
`with_index` to perform multiple batched queries to the database and
require less memory.
@thomasleese thomasleese force-pushed the pds-update-reduce-gap branch from 9ffe12e to ac50cc6 Compare April 8, 2025 09:42
This makes the gap between PDS jobs configurable in a settings variable,
allowing us to change this value without needing to do deploy the code.
@thomasleese thomasleese force-pushed the pds-update-reduce-gap branch from ac50cc6 to 07a09d2 Compare April 8, 2025 10:27
@thomasleese thomasleese changed the title Decrease gap between PDS update jobs Make gap between PDS jobs configurable Apr 8, 2025
@tvararu tvararu temporarily deployed to mavis-pr-3329 April 8, 2025 10:27 Inactive
Copy link

sonarqubecloud bot commented Apr 8, 2025

@thomasleese thomasleese merged commit c21de55 into main Apr 8, 2025
14 checks passed
@thomasleese thomasleese deleted the pds-update-reduce-gap branch April 8, 2025 10:38
thomasleese added a commit that referenced this pull request Apr 8, 2025
This adds a new environment variable to the task definition that allows
us to configure the wait time between when PDS jobs are enqueued without
needing a deployment, by storing the value in the parameter store.

#3329 is the
change to the application code which added the setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operations Improving live support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants