web / lib/hooks/use-ingest-progress-query
lib/hooks/use-ingest-progress-query
React Query hook for polling ingest file progress.
Replaces hand-rolled setInterval polling in step-processing.tsx. Automatically stops polling when the ingest reaches a terminal state.
Interfaces
ProgressApiResponse
Properties
type
type:
string
id
id:
number
status
status:
"processing"|"completed"|"failed"|"pending"|"parsing"
originalName
originalName:
string
catalogId
catalogId:
number|null
datasetsCount
datasetsCount:
number
datasetsProcessed
datasetsProcessed:
number
overallProgress
overallProgress:
number
estimatedCompletionTime
estimatedCompletionTime:
string|null
jobs
jobs:
object[]
id
id:
string|number
datasetId
datasetId:
string|number
datasetName?
optionaldatasetName?:string
currentStage
currentStage:
string
overallProgress
overallProgress:
number
stages?
optionalstages?:object[]
results?
optionalresults?:object
results.totalEvents?
optionaltotalEvents?:number
errorLog?
optionalerrorLog?:string|null
completedAt?
optionalcompletedAt?:string|null
Variables
ingestProgressQueryKeys
constingestProgressQueryKeys:object
Type Declaration
all
all: readonly [
"import-progress"]
byFile
byFile: (
ingestFileId) => readonly ["import-progress",string]
Parameters
ingestFileId
string | number
Returns
readonly ["import-progress", string]
Functions
useIngestProgressQuery()
useIngestProgressQuery(
ingestFileId):UseQueryResult<ProgressApiResponse,Error>
Parameters
ingestFileId
string | number | null
Returns
UseQueryResult<ProgressApiResponse, Error>