chore: adding debug

This commit is contained in:
Anthony Laibe 2023-03-29 18:07:37 +02:00 committed by Anthony Laibe
parent 2baa8e8ead
commit d86446ad53
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package market package market
import ( import (
"fmt"
"sync" "sync"
"time" "time"
@ -76,6 +77,7 @@ func (pm *Manager) makeCall(main func() (any, error), fallback func() (any, erro
errChan := hystrix.Go("marketClient", func() error { errChan := hystrix.Go("marketClient", func() error {
res, err := main() res, err := main()
if err != nil { if err != nil {
fmt.Println("MARKET ERROR", err)
return err return err
} }
pm.setIsConnected(true) pm.setIsConnected(true)
@ -88,6 +90,7 @@ func (pm *Manager) makeCall(main func() (any, error), fallback func() (any, erro
res, err := fallback() res, err := fallback()
if err != nil { if err != nil {
fmt.Println("FALLBACK MARKET ERROR", err)
pm.setIsConnected(false) pm.setIsConnected(false)
return err return err
} }