From 8d01ca6615dce0d5bba0089cdc6efad44c831fd5 Mon Sep 17 00:00:00 2001 From: Harshith Mohan Date: Fri, 24 May 2024 19:44:12 +0530 Subject: [PATCH] Debounce queue invalidation (#914) --- src/core/signalr/eventHandlers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/signalr/eventHandlers.ts b/src/core/signalr/eventHandlers.ts index ad5445e30..f133123d1 100644 --- a/src/core/signalr/eventHandlers.ts +++ b/src/core/signalr/eventHandlers.ts @@ -19,8 +19,10 @@ const invalidateImportFolders = debounce( 1000, ); -// Should we add a debounce here? It seems to work fine without it -const invalidateQueueItems = () => invalidateQueries(['queue', 'items']); +const invalidateQueueItems = debounce( + () => invalidateQueries(['queue', 'items']), + 500, +); const invalidateReleaseManagement = debounce( () => invalidateQueries(['release-management']),