prevent fast retry when questrade login fails
This commit is contained in:
parent
362e895b2e
commit
c139d7b713
4
main.go
4
main.go
@ -71,7 +71,9 @@ func main() {
|
|||||||
// Questrade authentication needs to be refreshed and persistentData written to disk in case app restarts
|
// Questrade authentication needs to be refreshed and persistentData written to disk in case app restarts
|
||||||
questradeClient, err = questrade.NewClient(persistentData.QuestradeRefreshToken)
|
questradeClient, err = questrade.NewClient(persistentData.QuestradeRefreshToken)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to create questrade client: %v", err)
|
log.Printf("failed to create questrade client: %v", err)
|
||||||
|
time.Sleep(time.Minute * 5) // prevent multiple fast login failures
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
persistentData.QuestradeRefreshToken = questradeClient.Credentials.RefreshToken
|
persistentData.QuestradeRefreshToken = questradeClient.Credentials.RefreshToken
|
||||||
|
Loading…
x
Reference in New Issue
Block a user