Preserve batch cancellation outcomes
This commit is contained in:
11
docs/cli.md
11
docs/cli.md
@@ -70,7 +70,10 @@ remains available.
|
||||
|
||||
`SIGINT` and `SIGTERM` cancel an active action. Weatherreporter lets that
|
||||
cancellation reach the action before exiting; when the action has a result, it
|
||||
emits the usual failed summary and exits nonzero.
|
||||
emits the usual failed summary and exits nonzero. A canceled batch retains any
|
||||
reports that were already published, marks interrupted and unstarted reports
|
||||
as `canceled`, skips batch notification, and identifies cancellation separately
|
||||
from report failures.
|
||||
|
||||
Action commands (`generate`, `run`, and `compare`) write a JSON summary to
|
||||
stdout unless `--quiet` is set. `run` also writes compact per-report and batch
|
||||
@@ -119,11 +122,15 @@ The `total`, `succeeded`, and `failed` counters describe report items only, so
|
||||
a failed batch notification can leave `failed` at `0` while the top-level
|
||||
notification and action status are `failed`.
|
||||
|
||||
When cancellation stops a batch, the summary also includes a nonzero
|
||||
`canceled` count. Canceled reports have `"status": "canceled"`; they are not
|
||||
included in `failed`, and the action still has failed status and exits nonzero.
|
||||
|
||||
Without `--quiet`, batch status lines use this form:
|
||||
|
||||
```text
|
||||
report=today status=succeeded output="/srv/weather/reports/today.md"
|
||||
batch=morning total=2 succeeded=2 failed=0
|
||||
batch=morning total=2 succeeded=2 failed=0 canceled=0
|
||||
```
|
||||
|
||||
### Compare Summary
|
||||
|
||||
Reference in New Issue
Block a user