mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Improve behaviour if bot was offline when page loaded
This commit is contained in:
parent
7cb070975d
commit
dd7e689ae6
|
@ -282,7 +282,7 @@ export default function createBotStore(store) {
|
|||
}
|
||||
});
|
||||
},
|
||||
async allRefreshFull({ commit, dispatch, state }) {
|
||||
async allRefreshFull({ commit, dispatch, state, getters }) {
|
||||
if (state.refreshing) {
|
||||
return;
|
||||
}
|
||||
|
@ -290,6 +290,14 @@ export default function createBotStore(store) {
|
|||
try {
|
||||
// Ensure all bots status is correct.
|
||||
await dispatch('pingAll');
|
||||
getters.allAvailableBotsList.forEach(async (e) => {
|
||||
if (
|
||||
getters[`${e}/${BotStoreGetters.isBotOnline}`] &&
|
||||
!getters[`${e}/${BotStoreGetters.botStatusAvailable}`]
|
||||
) {
|
||||
await dispatch('allGetState');
|
||||
}
|
||||
});
|
||||
const updates: Promise<AxiosInstance>[] = [];
|
||||
updates.push(dispatch('allRefreshFrequent', false));
|
||||
updates.push(dispatch('allRefreshSlow', true));
|
||||
|
|
Loading…
Reference in New Issue
Block a user