-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add setup_ensure_workers_cron function for worker management #512
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
feat: add setup_ensure_workers_cron function for worker management #512
Conversation
|
|
View your CI Pipeline Execution ↗ for commit dc5db88
☁️ Nx Cloud last updated this comment at |
6232598 to
ac3a640
Compare
1f0dbdd to
133efc3
Compare
133efc3 to
31944b5
Compare
ac3a640 to
28eab2e
Compare
31944b5 to
d43f53b
Compare
d43f53b to
aca53bc
Compare
19991aa to
a7d6936
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-512.pgflow.pages.dev 📝 Details:
_Last updated: _ |
aca53bc to
dc5db88
Compare
🚀 Production Deployment: Website✅ Successfully deployed to production! 🔗 Production URL: https://pgflow.dev 📝 Details:
Deployed at: 2025-12-08T10:24:25+01:00 |

Add setup_ensure_workers_cron function for automated worker management
This PR adds a new
setup_ensure_workers_cronfunction that automates worker management by setting up two cron jobs:pgflow_ensure_workers- Runs theensure_workers()function at a configurable interval (default: every 1 second)pgflow_cleanup_logs- Runs hourly to clean up old cron job logsThe function is idempotent - it safely replaces any existing jobs with the same names and returns a confirmation message with job IDs. This makes worker management more reliable and reduces manual intervention.
Key features:
cron_intervalparameterThis enables more reliable worker management in production environments.