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

fix: celery types and redis queue depth schedule #17672

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

pauldambra
Copy link
Member

We run a celery task once a second to check the redis queue depth. This seems excessive. Let's run it every ten.

Also, cron tab should take strings but we were passing ints

Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

Really weird regarding the strings but I guess thats fine.

Not sure about the increased delay regarding health checks and things but otherwise 👍


# PostHog Cloud cron jobs
# NOTE: We can't use is_cloud here as some Django elements aren't loaded yet. We check in the task execution instead
# Verify that persons data is in sync every day at 4 AM UTC
sender.add_periodic_task(crontab(hour=4, minute=0), verify_persons_data_in_sync.s())
sender.add_periodic_task(crontab(hour="4", minute="0"), verify_persons_data_in_sync.s())
Copy link
Contributor

Choose a reason for hiding this comment

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

That is wild that it takes strings 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess cron is strings so they're being very literal

@pauldambra pauldambra merged commit 20faa20 into master Sep 28, 2023
@pauldambra pauldambra deleted the fix/celery-types-and-schedules branch September 28, 2023 14:55
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.

2 participants