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