mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 03:25:15 +00:00
Fix delayed loading
This commit is contained in:
parent
c2a1f9cf3b
commit
42161bb848
|
@ -279,7 +279,7 @@ export default function createBotStore(store) {
|
|||
|
||||
startRefresh({ state, dispatch, commit }) {
|
||||
console.log('Starting automatic refresh.');
|
||||
dispatch('allRefreshFrequent', false);
|
||||
dispatch('allRefreshFull');
|
||||
|
||||
if (!state.refreshInterval) {
|
||||
// Set interval for refresh
|
||||
|
@ -288,7 +288,6 @@ export default function createBotStore(store) {
|
|||
}, 5000);
|
||||
commit('setRefreshInterval', refreshInterval);
|
||||
}
|
||||
dispatch('allRefreshSlow', false);
|
||||
if (!state.refreshIntervalSlow) {
|
||||
const refreshIntervalSlow = window.setInterval(() => {
|
||||
dispatch('allRefreshSlow', false);
|
||||
|
@ -308,10 +307,12 @@ export default function createBotStore(store) {
|
|||
}
|
||||
},
|
||||
|
||||
pingAll({ getters, dispatch }) {
|
||||
getters.allAvailableBotsList.forEach((e) => {
|
||||
dispatch(`${e}/ping`);
|
||||
});
|
||||
async pingAll({ getters, dispatch }) {
|
||||
await Promise.all(
|
||||
getters.allAvailableBotsList.map(async (e) => {
|
||||
await dispatch(`${e}/ping`);
|
||||
}),
|
||||
);
|
||||
},
|
||||
allGetState({ getters, dispatch }) {
|
||||
getters.allAvailableBotsList.forEach((e) => {
|
||||
|
|
|
@ -433,8 +433,10 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
const result = await api.get('/ping');
|
||||
commit('setPing', result.data);
|
||||
commit('setIsBotOnline', true);
|
||||
return Promise.resolve();
|
||||
} catch (error) {
|
||||
//
|
||||
return Promise.reject();
|
||||
}
|
||||
},
|
||||
[BotStoreActions.logout]() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user