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