From 5af3cd546cea456019e29e347f9e1fcf6bd81f1d Mon Sep 17 00:00:00 2001 From: charles-chenzz Date: Mon, 22 Jan 2024 19:59:03 +0600 Subject: [PATCH] rename masterchan to eventchan, retryNum -= 1 when error is retryable --- common/bizflow/graph.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/bizflow/graph.go b/common/bizflow/graph.go index 42c4a87..4738b85 100644 --- a/common/bizflow/graph.go +++ b/common/bizflow/graph.go @@ -119,7 +119,7 @@ func (g *Graph) execNext(it *item) { } } } -func (g *Graph) masterChanClosed() bool { +func (g *Graph) eventChanClosed() bool { select { case _, ok := <-g.eventChan: return !ok @@ -129,11 +129,11 @@ func (g *Graph) masterChanClosed() bool { } func (g *Graph) work(it *item) { // 先检查一下 - if g.masterChanClosed() { + if g.eventChanClosed() { return } defer func() { - if !g.masterChanClosed() { + if !g.eventChanClosed() { g.eventChan <- it } }()