swarm: bash task status keys expire after 72 hours
Nothing deletes the key of a finished task, so the bucket would grow with every task an agent runs. The shared bucket helper takes an optional max age, applied when the bucket is created; a live task's republishing keeps its own key.
This commit is contained in:
parent
1779fa0568
commit
1a698f1a97
1 changed files with 35 additions and 3 deletions
|
|
@ -195,7 +195,9 @@ status kept apart from the output. A task's status is one key, `<agent>.<task>`,
|
|||
`bash-task-status` bucket: its `state` (`pending`, `running`, `done`, `timed_out`,
|
||||
`interrupted` or `killed`), the command cut to 200 characters, when it began and when it
|
||||
entered its state, the exit status, and `ts`, the time of the publish. A live task republishes
|
||||
every 60 seconds, and a reader treats a live value older than three of those as stale. The output
|
||||
every 60 seconds, and a reader treats a live value older than three of those as stale. A key
|
||||
expires 72 hours after its last write, since nothing deletes a finished task's key, and a
|
||||
live task's republishing keeps its own. The output
|
||||
goes to `$SWARM.term.<agent>.bash.<task>`, with a `Swarm-Stream` header of `stdout` or
|
||||
`stderr`, into the stream `term-bash-<agent>` that swarm-controller creates for every declared
|
||||
agent, for 24 hours or 64 MiB like the subagent rows. The agent's credential may publish
|
||||
|
|
|
|||
Loading…
Reference in a new issue