-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add mark_worker_stopped function for graceful worker shutdown #506
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 mark_worker_stopped function for graceful worker shutdown #506
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 5813d23
☁️ Nx Cloud last updated this comment at |
179a131 to
a6b7275
Compare
ab375be to
db727ea
Compare
db727ea to
dbb4e58
Compare
a6b7275 to
a26dc00
Compare
dbb4e58 to
e6d1032
Compare
bfe384c to
89d0e0b
Compare
e6d1032 to
8e3510f
Compare
89d0e0b to
5e801eb
Compare
8e3510f to
404fa0c
Compare
5e801eb to
aedf84f
Compare
404fa0c to
389d7b8
Compare
aedf84f to
9d5e568
Compare
389d7b8 to
0de2c9a
Compare
9d5e568 to
ede8125
Compare
0de2c9a to
7f0069f
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-506.pgflow.pages.dev 📝 Details:
_Last updated: _ |
7f0069f to
5813d23
Compare
🚀 Production Deployment: Website✅ Successfully deployed to production! 🔗 Production URL: https://pgflow.dev 📝 Details:
Deployed at: 2025-12-08T09:50:32+01:00 |

Add mark_worker_stopped function for graceful worker shutdown
This PR adds a new SQL function
pgflow.mark_worker_stopped(worker_id)that sets thestopped_attimestamp on a worker row to signal a graceful shutdown. This function will be called by workers during thebeforeunloadevent.The changes include:
pkgs/core/schemas/0058_function_mark_worker_stopped.sqldatabase-types.tsstopped_attimestampThis functionality enables workers to signal when they're shutting down, which will help with proper resource cleanup and task reassignment.