refetch model installs when a new model install starts

This commit is contained in:
chainchompa 2024-06-14 17:09:07 -04:00
parent aae318425d
commit 328f160e88

View File

@ -6,9 +6,17 @@ import {
socketModelInstallComplete,
socketModelInstallDownloadProgress,
socketModelInstallError,
socketModelInstallStarted,
} from 'services/events/actions';
export const addModelInstallEventListener = (startAppListening: AppStartListening) => {
startAppListening({
actionCreator: socketModelInstallStarted,
effect: async (action, { dispatch }) => {
dispatch(api.util.invalidateTags([{ type: 'ModelInstalls' }]));
},
});
startAppListening({
actionCreator: socketModelInstallDownloadProgress,
effect: async (action, { dispatch }) => {