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, socketModelInstallComplete,
socketModelInstallDownloadProgress, socketModelInstallDownloadProgress,
socketModelInstallError, socketModelInstallError,
socketModelInstallStarted,
} from 'services/events/actions'; } from 'services/events/actions';
export const addModelInstallEventListener = (startAppListening: AppStartListening) => { export const addModelInstallEventListener = (startAppListening: AppStartListening) => {
startAppListening({
actionCreator: socketModelInstallStarted,
effect: async (action, { dispatch }) => {
dispatch(api.util.invalidateTags([{ type: 'ModelInstalls' }]));
},
});
startAppListening({ startAppListening({
actionCreator: socketModelInstallDownloadProgress, actionCreator: socketModelInstallDownloadProgress,
effect: async (action, { dispatch }) => { effect: async (action, { dispatch }) => {