Files
oott/backend/Cargo.toml
T
rzuasti d327f37fff Catch SIGTERM/SIGINT for graceful shutdown
Kubernetes and `docker stop` send SIGTERM and then SIGKILL once the grace
period expires; previously oott ignored it and was always force-killed.

Add a shutdown module that watches for SIGTERM (and SIGINT/Ctrl-C) and
cancels a CancellationToken shared by every long-running task. Each scanner,
the retention cleaner, and the notification delivery loop now select on the
token and stop at their next safe point (abandoning in-flight probes and
skipping inter-scan sleeps), the web server drains in-flight requests via
axum's with_graceful_shutdown, and main checkpoints the WAL via db::close()
once all tasks have stopped.

No internal deadline is added: the orchestrator's grace period already bounds
shutdown, and tasks stop on iteration boundaries so there is no half-written
DB state.

Refs #7
2026-06-22 11:33:08 -04:00

36 lines
1.1 KiB
TOML

[package]
name = "oott"
version = "0.2.3"
edition = "2024"
[dependencies]
env_logger = "0.11.8"
log = "0.4.29"
pnet = "0.35.0"
tokio = { version = "1.0", features = ["full"] }
tokio-util = "0.7.16"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
rusqlite = { version = "0.38.0", features = ["bundled", "chrono"] }
rusqlite_migration = { version = "2.4.1", features = ["from-directory"] }
include_dir = "0.7.4"
chrono = {version = "0.4.43", features = ["serde"]}
pushover = "0.4.0"
config = "0.15.19"
lazy_static = "1.5.0"
duration-string = { version="0.5.3", features = ["serde"] }
clap = {version="4.5.54", features=["derive"]}
axum = "0.8.8"
tower-http = { version = "0.6.8", features = ["fs", "cors", "set-header"] }
r2d2 = "0.8.10"
r2d2_sqlite = "0.32.0"
once_cell = "1.21.3"
tower = { version = "0.5.3", features = ["util"] }
utoipa = { version = "5", features = ["axum_extras", "chrono"] }
utoipa-swagger-ui = { version = "9", features = ["axum"] }
simple-dns = "0.11.3"
socket2 = "0.6.4"
csnmp = "0.6.0"
reqwest = { version = "0.12", features = ["json"] }