R12: the queue's approval wait, stall and cap
A pipeline whose every step not ended is an approval asked of the operator leaves the bound: its running key goes and the next waiting is placed; answered and still running, it is keyed running at once, over the bound. After every placing, pipelines waiting with none running raise the finding pipelines-stalled naming the first waiting, cleared once one runs. A start beyond pipelines-waiting-cap is an ordinary waiting pipeline and raises queue-full naming it, cleared when an end brings the waiting back to the cap. Both findings are the scope delivery's, the kind as id, warnings with no owner. Builds: design 47 H §748; lead answers H-A-14, H-A-36, H-A-52, H-A-106 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -207,7 +207,9 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
return err
|
||||
}
|
||||
logger.Printf("the queue: %d pipelines at once, at most %d waiting", atOnce, waitingCap)
|
||||
starter.Queue = &pipeline.Queue{Store: queueKV{ctx: ctx, kv: queueBucket}, AtOnce: atOnce}
|
||||
starter.Queue = &pipeline.Queue{Store: queueKV{ctx: ctx, kv: queueBucket}, AtOnce: atOnce, Cap: waitingCap,
|
||||
Findings: rv.Findings, Observer: cred.Module}
|
||||
hearer.Rejoin = starter.Rejoin
|
||||
hearer.Turn = func(key string) {
|
||||
if n, err := starter.Turn(key, rv.Catalog.View); err != nil || n > 0 {
|
||||
logger.Printf("the end of %s placed %d waiting pipelines (%v)", key, n, err)
|
||||
|
||||
Reference in New Issue
Block a user