Quick fix for isLocationIndexing (#1679)

Update useIsLocationIndexing.ts
This commit is contained in:
ameer2468
2023-10-26 14:22:03 +03:00
committed by GitHub
parent 033e61ac33
commit 968bf8985a

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;
}
})