Skip to content

fix(workers): stop database monitor during shutdown - #325

Merged
parkerwinner merged 1 commit into
parkerwinner:mainfrom
iamcracked-dev:fix-stop-db-monitor-320
Sep 28, 2026
Merged

parkerwinner merged 1 commit into
parkerwinner:mainfrom
iamcracked-dev:fix-stop-db-monitor-320

Conversation

@iamcracked-dev

Copy link
Copy Markdown
Contributor

Closes #321
Closes #320
Closes #319
Closes #318

Summary

Completes the application shutdown path for the database connection-pool monitor so the process stops its periodic background work before database resources are released.

Changes

  • Starts the database monitor with a cancellable context instead of an unbounded ticker loop.
  • Tracks monitor completion and waits for it during shutdown.
  • Stops the monitor after the existing HTTP and worker shutdown sequence, but before closing the SQL connection pool.
  • Preserves the existing monitoring cadence and structured log fields while the service is running.

Scope

The repository already loads runtime configuration from environment variables and already coordinates its request workers through cancellation and a wait group. This focused change closes the remaining shutdown gap for the independent database monitor. The other assigned issues are listed above for assignment tracking; their broader API-validation and logging work remains separately scoped.

Verification

No dependencies were installed and no builds, tests, or CI checks were run, per request.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@iamcracked-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@parkerwinner
parkerwinner merged commit c5c865a into parkerwinner:main Sep 28, 2026
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.

Lack of Input Validation Missing Graceful Shutdown for Workers Inconsistent Logging Hardcoded Configuration Values

2 participants