Replace em dashes with hyphens across docs and comments
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
||||
name = "continuum-ai-worker"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Continuum AI worker — consumes camera frame batches from Redis Streams and runs print-failure detection"
|
||||
description = "Continuum AI worker - consumes camera frame batches from Redis Streams and runs print-failure detection"
|
||||
license = "UNLICENSED"
|
||||
|
||||
[[bin]]
|
||||
@@ -21,4 +21,4 @@ dotenvy = "0.15"
|
||||
|
||||
# Real inference (ONNX Runtime via the `ort` crate) and the Postgres audit
|
||||
# write (via `sqlx`) go here once src/inference and src/reporter grow past
|
||||
# their stubs — see those modules' doc comments.
|
||||
# their stubs - see those modules' doc comments.
|
||||
|
||||
@@ -8,7 +8,7 @@ failures.
|
||||
## This is a learning-stage boilerplate
|
||||
|
||||
Real ONNX Runtime inference (the `ort` crate) and the Postgres audit write
|
||||
(`sqlx`) are **not** implemented yet — `src/inference/mod.rs` always
|
||||
(`sqlx`) are **not** implemented yet - `src/inference/mod.rs` always
|
||||
"detects" one fixed example failure, and `src/reporter/mod.rs` only prints
|
||||
where the Postgres write would go. The Redis Streams consumer-group loop in
|
||||
`main.rs` and the Redis pub/sub alert in `reporter/` are real. This lets the
|
||||
@@ -24,7 +24,7 @@ continuum-proxy --(frames)--> continuum-backend --(XADD)--> stream:camera_frames
|
||||
v
|
||||
inference::detect (stub for now)
|
||||
v
|
||||
reporter::report (Redis pub/sub — real)
|
||||
reporter::report (Redis pub/sub - real)
|
||||
```
|
||||
|
||||
## Getting started
|
||||
@@ -40,6 +40,6 @@ cargo run
|
||||
src/
|
||||
main.rs Consumer-group loop: XREADGROUP -> detect -> report -> XACK
|
||||
config.rs Loads settings from environment variables
|
||||
inference/ Detection stub — real ONNX Runtime inference goes here later
|
||||
inference/ Detection stub - real ONNX Runtime inference goes here later
|
||||
reporter/ Redis pub/sub alert (real) + a note for the Postgres write (later)
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ pub struct Detection {
|
||||
|
||||
/// Stand-in for real ONNX Runtime inference (the `ort` crate, using a model
|
||||
/// trained on failure images). Always reports one fixed "failure" so the
|
||||
/// rest of the pipeline — reporting, acking the stream entry — has
|
||||
/// rest of the pipeline - reporting, acking the stream entry - has
|
||||
/// something to do and can be tested without a real model file.
|
||||
///
|
||||
/// Swap this out once you're comfortable with the pipeline around it:
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
let mut reporter = Reporter::connect(&config.redis_url).await?;
|
||||
|
||||
// Consumer groups have to exist before you can read from them. This
|
||||
// fails with "BUSYGROUP" if it already exists — that's fine, ignore it.
|
||||
// fails with "BUSYGROUP" if it already exists - that's fine, ignore it.
|
||||
let _: redis::RedisResult<String> = conn
|
||||
.xgroup_create_mkstream(&config.frame_stream, &config.consumer_group, "$")
|
||||
.await;
|
||||
|
||||
+2
-2
@@ -17,11 +17,11 @@ impl Reporter {
|
||||
Ok(Self { redis })
|
||||
}
|
||||
|
||||
/// Publishes to Redis (real — this is what `continuum-backend`'s
|
||||
/// Publishes to Redis (real - this is what `continuum-backend`'s
|
||||
/// WebSocket fan-out subscribes to, for live operator-console alerts).
|
||||
///
|
||||
/// A real version would also `INSERT` into Postgres here via `sqlx` for
|
||||
/// the permanent audit trail — that's left as a `println!` for now;
|
||||
/// the permanent audit trail - that's left as a `println!` for now;
|
||||
/// come back to it once async SQL feels comfortable.
|
||||
pub async fn report(&mut self, printer_id: &str, detections: &[Detection]) -> anyhow::Result<()> {
|
||||
let best = &detections[0];
|
||||
|
||||
Reference in New Issue
Block a user