File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,8 @@ export const addSetDefaultSettingsListener = (startAppListening: AppStartListeni
39
39
return ;
40
40
}
41
41
42
- const request = dispatch ( modelsApi . endpoints . getModelConfigs . initiate ( ) ) ;
42
+ const request = dispatch ( modelsApi . endpoints . getModelConfigs . initiate ( undefined , { subscribe : false } ) ) ;
43
43
const data = await request . unwrap ( ) ;
44
- request . unsubscribe ( ) ;
45
44
const models = modelConfigsAdapterSelectors . selectAll ( data ) ;
46
45
47
46
const modelConfig = models . find ( ( model ) => model . key === currentModel . key ) ;
Original file line number Diff line number Diff line change @@ -29,11 +29,8 @@ export const addSocketConnectedEventListener = (startAppListening: AppStartListe
29
29
30
30
// Bail on the recovery logic if this is the first connection - we don't need to recover anything
31
31
if ( $isFirstConnection . get ( ) ) {
32
- // Populate the model configs on first connection. This query cache has a 24hr timeout, so we can immediately
33
- // unsubscribe.
34
- const request = dispatch ( modelsApi . endpoints . getModelConfigs . initiate ( ) ) ;
35
- request . unsubscribe ( ) ;
36
-
32
+ // Populate the model configs on first connection.
33
+ dispatch ( modelsApi . endpoints . getModelConfigs . initiate ( undefined , { subscribe : false } ) ) ;
37
34
$isFirstConnection . set ( false ) ;
38
35
return ;
39
36
}
@@ -61,10 +58,10 @@ export const addSocketConnectedEventListener = (startAppListening: AppStartListe
61
58
const queueStatusRequest = dispatch (
62
59
await queueApi . endpoints . getQueueStatus . initiate ( undefined , {
63
60
forceRefetch : true ,
61
+ subscribe : false ,
64
62
} )
65
63
) ;
66
64
const nextQueueStatusData = await queueStatusRequest . unwrap ( ) ;
67
- queueStatusRequest . unsubscribe ( ) ;
68
65
69
66
// If the queue hasn't changed, we don't need to do anything.
70
67
if ( isEqual ( prevQueueStatusData ?. queue , nextQueueStatusData . queue ) ) {
You can’t perform that action at this time.
0 commit comments