law add_waiting_dedups
import bend-kube-runtime@0.2.0.0/LAWS.bend as LAWSimport Base
import bend-kube-runtime@0.2.0.0/src/queue.bend as Q
137# Adding a key that already waits changes nothing but its timer.
138law add_waiting_dedups:
139 for f: List<&2, String>
140 for b: List<&2, String>
141 for inq: Map<&2, U32>
142 for run: Map<&2, U32>
143 for d: Map<&2, U32>
144 for g: Map<&2, U32>
145 for fl: Map<&2, U32>
146 for n: U32
147 for mx: U32
148 for key: String
149 for idle: {Q.Mp.has(run, key) == False{} : Bool}
150 for waiting: {Q.Mp.has(inq, key) == True{} : Bool}
151 {Q.Queue.add(Q.Queue{f, b, inq, run, d, g, fl, n, mx}, key)
152 == Q.Queue{f, b, inq, run, d, Q.Mp.bump(g, key), fl, n, mx} : Q.Queue}
Uses (11)
Used by (0)
No other definition uses this definition.