(ctx context.Context)
| 162 | const stepFinalizeTimeout = 5 * time.Second |
| 163 | |
| 164 | func stepFinalizeContext(ctx context.Context) (context.Context, context.CancelFunc) { |
| 165 | if ctx == nil { |
| 166 | panic("chatdebug: nil context") |
| 167 | } |
| 168 | return context.WithTimeout(context.WithoutCancel(ctx), stepFinalizeTimeout) |
| 169 | } |
| 170 | |
| 171 | func syncStepCounter(runID uuid.UUID, stepNumber int32) { |
| 172 | val, _ := stepCounters.LoadOrStore(runID, &atomic.Int32{}) |
no outgoing calls