mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
check persistence error
This commit is contained in:
parent
9bdc05b69c
commit
0b8e5852eb
|
@ -720,7 +720,9 @@ func (environ *Environment) setupTelegram(userConfig *Config, telegramBotToken s
|
|||
var sessions = interact.TelegramSessionMap{}
|
||||
var sessionStore = persistence.NewStore("bbgo", "telegram", telegramID)
|
||||
if err := sessionStore.Load(&sessions); err != nil {
|
||||
log.WithError(err).Errorf("sessions load error")
|
||||
if err != service.ErrPersistenceNotExists {
|
||||
log.WithError(err).Errorf("unexpected persistence error")
|
||||
}
|
||||
} else {
|
||||
for _, session := range sessions {
|
||||
if session.IsAuthorized() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user