mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): race condition queue status
Sequence of events causing the race condition: - Enqueue batch - Invalidate `SessionQueueStatus` tag - Request updated queue status via HTTP - batch still processing at this point - Batch completes - Event emitted saying so - Optimistically update the queue status cache, it is correct - HTTP request makes it back and overwrites the optimistic update, indicating the batch is still in progress FIxed by not invalidating the cache.
This commit is contained in:
parent
19434e73b4
commit
d3cdcef36b
@ -70,7 +70,7 @@ export const queueApi = api.injectEndpoints({
|
||||
body: arg,
|
||||
method: 'POST',
|
||||
}),
|
||||
invalidatesTags: ['SessionQueueStatus', 'CurrentSessionQueueItem', 'NextSessionQueueItem'],
|
||||
invalidatesTags: ['CurrentSessionQueueItem', 'NextSessionQueueItem'],
|
||||
onQueryStarted: async (arg, api) => {
|
||||
const { dispatch, queryFulfilled } = api;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user