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

Batch google sheet updates #35219

Merged
merged 3 commits into from Jun 9, 2020
Merged

Batch google sheet updates #35219

merged 3 commits into from Jun 9, 2020

Conversation

molly-moen
Copy link
Contributor

Our teacher application export stopped working because we were trying to upload too many applications at once and hit an error. This updates 2000 rows at a time, saving between updates. I kept the batch as big as possible without failing, as the more batches we do the slower the update is. Based on my research the ruby api does not have any methods built-in for batching so I had to do it manually.

Links

Testing story

Ran the teacher_applications_to_gdrive script locally against 3700 applications (as of 6/1 we had 3264 in production) as described here at least 5 times and saw no failures. Locally it takes about 15 minutes to run on 3700 applications.

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@molly-moen molly-moen requested review from bencodeorg and a team June 8, 2020 23:32
Copy link
Member

@breville breville left a comment

Choose a reason for hiding this comment

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

Neat!

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

👍

@molly-moen molly-moen merged commit d2e571d into staging Jun 9, 2020
@molly-moen molly-moen deleted the molly/teacher-export-fix branch June 9, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants