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

Cron Jobs: Update long-running PLC job schedule #36415

Merged
merged 3 commits into from
Aug 25, 2020

Conversation

molly-moen
Copy link
Contributor

@molly-moen molly-moen commented Aug 24, 2020

We had the below honeybadger errors due to process_pd_workshop_ends, sync_dropbox and fill_jotform_placeholders having too quick of schedules--the scripts were trying to run multiple times at once. All were previously running every minute. Updated process_pd_workshop_ends to run every 2 minutes instead of every minute, and updated fill_jotform_placeholder to run every 5 minutes, as we now have very few JotForm surveys and the results do not need to be immediately available. sync_dropbox has a "total time" constant in the script which was set to 60 - update interval, so it would occasionally run over time. Updated that script to have a 5 second buffer.

Links

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 a review from a team August 24, 2020 17:53
@bencodeorg
Copy link
Contributor

First two changes look good, but I think the sync_dropbox one might be good to keep at a minute. The script actually runs another command that syncs changes from Dropbox to our staging instance every 5 seconds, which gives almost real time feedback to content editors. This would result in half of the time having changes take up to a minute to show up in staging, which I feel could be annoying.

I think the fix might be to dial down the TOTAL_SECONDS = 60 - INTERVAL_SECONDS here to maybe 55 - INTERVAL_SECONDS, which hopefully will give enough room for the script to complete before the minute mark?

Copy link
Contributor

@bencodeorg bencodeorg left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@breville
Copy link
Member

@bencodeorg nice catch on maintaining the editor experience. And thanks @molly-moen for the broader fix.

@molly-moen molly-moen merged commit 925af9d into staging Aug 25, 2020
@molly-moen molly-moen deleted the molly/update-cron-jobs branch August 25, 2020 15:56
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

4 participants