Skip to content

feat: graceful shutdown β€” SIGINT handler - #67

Merged
ajianaz merged 1 commit into
developfrom
feat/graceful-shutdown
May 29, 2026
Merged

feat: graceful shutdown β€” SIGINT handler#67
ajianaz merged 1 commit into
developfrom
feat/graceful-shutdown

Conversation

@ajianaz

@ajianaz ajianaz commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add ctrlc = "3" dependency to uteke-cli
  • Add Uteke::shutdown() method β€” saves dirty vector index to disk
  • Install SIGINT handler in main.rs via AtomicBool
  • Call shutdown() after every command execution
  • Exit with code 130 on SIGINT

Changes

  • crates/uteke-cli/Cargo.toml β€” add ctrlc dep
  • crates/uteke-core/src/lib.rs β€” add shutdown() method
  • crates/uteke-cli/src/main.rs β€” ctrlc handler + shutdown call

Verification

  • cargo check βœ“
  • cargo clippy βœ“
  • cargo test β€” 15/15 passed βœ“
  • cargo fmt βœ“

Closes #31

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ajianaz, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 4 minutes and 13 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

βŒ› How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71c9a1c0-88b5-40e6-ad2d-d494d53d7345

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between b92a7b1 and 2c55748.

β›” Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
πŸ“’ Files selected for processing (3)
  • crates/uteke-cli/Cargo.toml
  • crates/uteke-cli/src/main.rs
  • crates/uteke-core/src/lib.rs
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/graceful-shutdown

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add ctrlc dependency to uteke-cli
- Add Uteke::shutdown() method that saves dirty vector index
- Install SIGINT handler in main.rs setting AtomicBool
- Call shutdown() after command execution
- Exit with code 130 on SIGINT

Closes #31
@ajianaz
ajianaz force-pushed the feat/graceful-shutdown branch from cebba0e to 2c55748 Compare May 29, 2026 17:10
@ajianaz
ajianaz merged commit 10fe5f2 into develop May 29, 2026
7 checks passed
@ajianaz
ajianaz deleted the feat/graceful-shutdown branch May 30, 2026 04: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.

Graceful shutdown β€” SIGINT handler, save index on exit

1 participant