prevent fast retry when questrade login fails

This commit is contained in:
Steven Polley 2023-11-12 13:06:30 -07:00
parent 362e895b2e
commit c139d7b713

View File

@ -71,7 +71,9 @@ func main() {
// Questrade authentication needs to be refreshed and persistentData written to disk in case app restarts
questradeClient, err = questrade.NewClient(persistentData.QuestradeRefreshToken)
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