Quick fix for isLocationIndexing (#1679)

Update useIsLocationIndexing.ts
This commit is contained in:
ameer2468 authored and GitHub committed 2023-10-26 11:22:03 +00:00
1 parent 033e61ac33
commit 968bf8985a
1 file changed
+1 -1
+1 -1
View File
@@ -14,7 +14,7 @@ export const useIsLocationIndexing = (locationId: number): boolean => {
const isLocationIndexing =
jobGroups?.some((group) =>
group.jobs.some((job) => {
if (job.name === 'indexer' && job.metadata.location.id === locationId) {
if (job.name === 'indexer' && job.metadata.location.id === locationId && (job.status === 'Running' || job.status === 'Queued')) {
return job.completed_task_count === 0;
}
})