mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-27 05:25:17 +00:00
Reliably use setIsBotOnline
This commit is contained in:
parent
8a7c6cbddc
commit
0644a49ca8
|
@ -162,11 +162,11 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
// TODO: Name collision!
|
// TODO: Name collision!
|
||||||
this.ping = `${result.data.status} ${now.toString()}`;
|
this.ping = `${result.data.status} ${now.toString()}`;
|
||||||
this.isBotOnline = true;
|
this.setIsBotOnline(true);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('ping fail');
|
console.log('ping fail');
|
||||||
this.isBotOnline = false;
|
this.setIsBotOnline(false);
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user