debug
This commit is contained in:
parent
a7596ff33d
commit
df757e097b
@ -4,6 +4,7 @@ import (
|
||||
"amocrm/internal/models"
|
||||
"amocrm/internal/workers_methods"
|
||||
"context"
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"github.com/twmb/franz-go/pkg/kgo"
|
||||
"go.uber.org/zap"
|
||||
@ -36,6 +37,12 @@ func (wc *QueueUpdater) Start(ctx context.Context) {
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
func () {
|
||||
defer func(){
|
||||
if v:=recover();v!=nil{
|
||||
fmt.Println("queuer recover",v)
|
||||
}
|
||||
}()
|
||||
select {
|
||||
case <-ticker.C:
|
||||
wc.consumeMessages(ctx)
|
||||
@ -43,6 +50,7 @@ func (wc *QueueUpdater) Start(ctx context.Context) {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user