mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-14 04:03:51 +00:00
Properly handle dashboard startup
This commit is contained in:
parent
3bf4eb94c6
commit
ccfa81b051
|
@ -205,6 +205,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
}
|
}
|
||||||
// Refresh data only when needed
|
// Refresh data only when needed
|
||||||
if (forceUpdate || this.refreshRequired) {
|
if (forceUpdate || this.refreshRequired) {
|
||||||
|
try {
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
// TODO: Should be AxiosInstance
|
// TODO: Should be AxiosInstance
|
||||||
const updates: Promise<any>[] = [];
|
const updates: Promise<any>[] = [];
|
||||||
|
@ -217,8 +218,10 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
updates.push(this.getBlacklist());
|
updates.push(this.getBlacklist());
|
||||||
await Promise.all(updates);
|
await Promise.all(updates);
|
||||||
this.refreshRequired = false;
|
this.refreshRequired = false;
|
||||||
|
} finally {
|
||||||
this.refreshing = false;
|
this.refreshing = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
async refreshFrequent() {
|
async refreshFrequent() {
|
||||||
|
|
|
@ -183,7 +183,7 @@ export default defineComponent({
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await botStore.allGetDaily({ timescale: 30 });
|
await botStore.allGetDaily({ timescale: 30 });
|
||||||
botStore.activeBot.getTrades();
|
// botStore.activeBot.getTrades();
|
||||||
botStore.activeBot.getOpenTrades();
|
botStore.activeBot.getOpenTrades();
|
||||||
botStore.activeBot.getProfit();
|
botStore.activeBot.getProfit();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user