mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-17 01:17:43 +00:00
fixup! Add retries functionality.
This commit is contained in:
@@ -87,7 +87,7 @@ func (g *GraphQL) Query(queryContent string, queryVariables interface{}, queryHe
|
|||||||
retry.Attempts(uint(g.RetriesNumber)),
|
retry.Attempts(uint(g.RetriesNumber)),
|
||||||
retry.OnRetry(
|
retry.OnRetry(
|
||||||
func(n uint, err error) {
|
func(n uint, err error) {
|
||||||
g.Log.Warning("Retrying the query", map[string]interface{}{"_attempt": n, "_error": err.Error()})
|
g.Log.Debug("Retrying the query", map[string]interface{}{"_attempt": n, "_error": err.Error()})
|
||||||
time.Sleep(time.Duration(g.RetriesDelay) * time.Millisecond)
|
time.Sleep(time.Duration(g.RetriesDelay) * time.Millisecond)
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user