Skip to content

Commit

Permalink
fixed: producerCluster.atWithWrapper, producerCluster.delayWithWrappe…
Browse files Browse the repository at this point in the history
…r bugs
  • Loading branch information
iwctwbai committed Apr 17, 2024
1 parent ab6093a commit 7063d28
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dq/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ func (p *producerCluster) insert(fn func(node Producer) (string, error)) (string
}

func (p *producerCluster) atWithWrapper(body []byte, at time.Time) (string, error) {
return p.At(body, at)
return p.insert(func(node Producer) (string, error) {
return node.atWithWrapper(body, at)
})
}

func (p *producerCluster) delayWithWrapper(body []byte, delay time.Duration) (string, error) {
return p.Delay(body, delay)
return p.insert(func(node Producer) (string, error) {
return node.delayWithWrapper(body, delay)
})
}

0 comments on commit 7063d28

Please sign in to comment.