Preserve batch cancellation outcomes

This commit is contained in:
2026-08-13 03:02:59 +00:00
parent 4b748c2e53
commit 70cad789ea
11 changed files with 207 additions and 17 deletions

View File

@@ -28,13 +28,18 @@ type generationCollector struct {
type publicationGateContext struct {
context.Context
err error
checks int
err error
checks int
afterChecks int
}
func (c *publicationGateContext) Err() error {
c.checks++
if c.checks >= 2 {
afterChecks := c.afterChecks
if afterChecks == 0 {
afterChecks = 2
}
if c.checks >= afterChecks {
return c.err
}
return nil