File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
invokeai/frontend/web/src/features/queue/components Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import { ButtonGroup } from '@chakra-ui/react' ;
2+ import { useAppSelector } from 'app/store/storeHooks' ;
23import { memo } from 'react' ;
34import { useTranslation } from 'react-i18next' ;
45import { useGetInvocationCacheStatusQuery } from 'services/api/endpoints/appInfo' ;
6+ import { useGetQueueStatusQuery } from 'services/api/endpoints/queue' ;
57import ClearInvocationCacheButton from './ClearInvocationCacheButton' ;
68import ToggleInvocationCacheButton from './ToggleInvocationCacheButton' ;
79import StatusStatGroup from './common/StatusStatGroup' ;
810import StatusStatItem from './common/StatusStatItem' ;
911
1012const InvocationCacheStatus = ( ) => {
13+ const { t } = useTranslation ( ) ;
14+ const isConnected = useAppSelector ( ( state ) => state . system . isConnected ) ;
15+ const { data : queueStatus } = useGetQueueStatusQuery ( undefined ) ;
1116 const { data : cacheStatus } = useGetInvocationCacheStatusQuery ( undefined , {
12- pollingInterval : 5000 ,
17+ pollingInterval :
18+ isConnected &&
19+ queueStatus ?. processor . is_started &&
20+ queueStatus ?. queue . pending > 0
21+ ? 5000
22+ : 0 ,
1323 } ) ;
14- const { t } = useTranslation ( ) ;
24+
1525 return (
1626 < StatusStatGroup >
1727 < StatusStatItem
You can’t perform that action at this time.
0 commit comments