Skip to content

Commit 0241103

Browse files
committed
chore: fix lint
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 59db366 commit 0241103

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

queue.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ func (q *Queue) Start() {
8787
// Shutdown stops all queues.
8888
func (q *Queue) Shutdown() {
8989
q.stopOnce.Do(func() {
90-
q.worker.Shutdown()
90+
if err := q.worker.Shutdown(); err != nil {
91+
q.logger.Error(err)
92+
}
9193
close(q.quit)
9294
})
9395
}
@@ -123,7 +125,9 @@ func (q *Queue) work() {
123125
}
124126
}()
125127
q.logger.Infof("start the worker num: %d", num)
126-
q.worker.Run(q.quit)
128+
if err := q.worker.Run(q.quit); err != nil {
129+
q.logger.Error(err)
130+
}
127131
q.logger.Infof("stop the worker num: %d", num)
128132
})
129133
if err := q.worker.AfterRun(); err != nil {

0 commit comments

Comments
 (0)