Skip to content

feat(keeper): implement graceful shutdown with 30s timeout and struct… - #190

Open
Sheebazz wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
Sheebazz:fix/keeper-graceful-shutdown
Open

feat(keeper): implement graceful shutdown with 30s timeout and struct…#190
Sheebazz wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
Sheebazz:fix/keeper-graceful-shutdown

Conversation

@Sheebazz

@Sheebazz Sheebazz commented Aug 1, 2026

Copy link
Copy Markdown

Closes #152

This pull request implements graceful shutdown capabilities for the services/keeper watch mode, ensuring in-flight rounds are completely drained before the process exits.

Modifications:

  • Added signal handlers (SIGINT/SIGTERM) to watch.ts and serve.ts that stop picking up new rounds and wait for the current one to complete.
  • Implemented a 30-second forced exit timeout to prevent indefinite hanging if a blockchain request stalls.
  • Replaced standard console logs with structured JSON log lines (shutdown_start, shutdown_complete, shutdown_timeout).
  • Appended a dedicated unit test in watch.test.ts to simulate and assert graceful loop termination during a queued round.
  • Appended operational behavior documentation to the README.md.

@drips-wave

drips-wave Bot commented Aug 1, 2026

Copy link
Copy Markdown

@Sheebazz 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

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.

keeper: graceful shutdown and in-flight round draining in watch mode

1 participant