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

Allow running jobs hourly #373

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Allow running jobs hourly #373

merged 2 commits into from
Jul 24, 2024

Conversation

jsnshrmn
Copy link
Member

@jsnshrmn jsnshrmn commented Jul 24, 2024

[//]: # (Thank you for uploading a PR to Wikilinks (externallinks)!)

Description

  • switch from host crontab docker exec -t $(docker ps -q -f name=production_externallinks) python manage.py runcrons to using a docker swarm service running python manage.py cronloop
  • switch from default cache-based cron job lock to db-based lock

Rationale

  • switching cron lock providers means we no longer have to have a "dumb" shared timeout for all jobs
  • it also means that we can see the active locks in django admin
  • switching to a cronloop swarm service makes troubleshooting much easier

Phabricator Ticket

https://phabricator.wikimedia.org/T351860

How Has This Been Tested?

  • I ran this locally and verified that the userlist job now runs hourly.

Screenshots of your changes (if appropriate):

image

Types of changes

What types of changes does your code introduce? Add an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@suecarmol suecarmol merged commit 879f07e into master Jul 24, 2024
3 checks passed
@suecarmol suecarmol deleted the Jsn.sherman/T351654 branch July 24, 2024 17:07
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.

3 participants