chore: update worker interface (#592)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -278,7 +278,7 @@ func handleNotification(ctx context.Context, cfg config.ConfYaml, req gorush.Req
|
||||
notification.AddWaitCount()
|
||||
}
|
||||
|
||||
if err := q.Enqueue(*notification); err != nil {
|
||||
if err := q.Queue(*notification); err != nil {
|
||||
markFailedNotification(cfg, notification, "max capacity reached")
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
w = simple.NewWorker(int(cfg.Core.QueueNum))
|
||||
q = queue.NewQueue(w)
|
||||
q = queue.NewQueue(w, 4)
|
||||
q.Start()
|
||||
defer func() {
|
||||
q.Stop()
|
||||
q.Shutdown()
|
||||
q.Wait()
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user