debug
This commit is contained in:
parent
75870273bd
commit
a7596ff33d
@ -21,6 +21,7 @@ import (
|
||||
"errors"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal"
|
||||
"time"
|
||||
"fmt"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@ -28,7 +29,7 @@ import (
|
||||
func Run(ctx context.Context, config initialize.Config, logger *zap.Logger) error {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logger.Error("Recovered from a panic", zap.Any("error", r))
|
||||
logger.Error("Recovered in app from a panic", zap.Any("error", r))
|
||||
}
|
||||
}()
|
||||
|
||||
@ -135,6 +136,7 @@ func Run(ctx context.Context, config initialize.Config, logger *zap.Logger) erro
|
||||
|
||||
go dataUpdater.Start(ctx)
|
||||
go queUpdater.Start(ctx)
|
||||
fmt.Println("UMBRELLA")
|
||||
go dealsPoster.Start(ctx)
|
||||
go fieldsPoster.Start(ctx)
|
||||
|
||||
|
@ -45,6 +45,7 @@ func NewPostDealsWC(deps Deps) *PostDeals {
|
||||
}
|
||||
|
||||
func (wc *PostDeals) Start(ctx context.Context) {
|
||||
fmt.Println("Start")
|
||||
ticker := time.NewTicker(1 * time.Minute)
|
||||
defer ticker.Stop()
|
||||
defer func() {
|
||||
@ -60,6 +61,7 @@ func (wc *PostDeals) Start(ctx context.Context) {
|
||||
wc.startFetching(ctx)
|
||||
|
||||
case <-ctx.Done():
|
||||
fmt.Println("Done")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user