Module "wordpress-packages/real-queue/lib/hooks/useProgress"
Functions
useProgress
- useProgress<JobData, AdditionalData>(__namedParameters: { fetchAdditionalData: string | false; fetchStatusInterval: number; onAdditionalData: (data: AdditionalData) => void; onCancel: () => void; type: string }): { cancelling: boolean; currentJob: Job<JobData>; errors: { actions: Array<{ action?: "delete" | "retry" | "skip"; linkText: string; target?: string; url: string }>; description: string; failedJobs: Job[]; label: string; type: string }; failure: number; handleCancel: (Anonymous function); jobsStarted: boolean; paused: number; percent: number; remaining: number; status: "done" | "not-started" | "failed"; total: number }
-
Type parameters
-
JobData = any
-
AdditionalData: Record<string, any> = {}
Parameters
-
__namedParameters: { fetchAdditionalData: string | false; fetchStatusInterval: number; onAdditionalData: (data: AdditionalData) => void; onCancel: () => void; type: string }
-
fetchAdditionalData: string | false
-
fetchStatusInterval: number
-
onAdditionalData: (data: AdditionalData) => void
-
- (data: AdditionalData): void
-
onCancel: () => void
-
type: string
Returns { cancelling: boolean; currentJob: Job<JobData>; errors: { actions: Array<{ action?: "delete" | "retry" | "skip"; linkText: string; target?: string; url: string }>; description: string; failedJobs: Job[]; label: string; type: string }; failure: number; handleCancel: (Anonymous function); jobsStarted: boolean; paused: number; percent: number; remaining: number; status: "done" | "not-started" | "failed"; total: number }
-
cancelling: boolean
-
currentJob: Job<JobData>
-
errors: { actions: Array<{ action?: "delete" | "retry" | "skip"; linkText: string; target?: string; url: string }>; description: string; failedJobs: Job[]; label: string; type: string }
-
actions: Array<{ action?: "delete" | "retry" | "skip"; linkText: string; target?: string; url: string }>
-
description: string
-
failedJobs: Job[]
-
label: string
-
type: string
-
failure: number
-
handleCancel: (Anonymous function)
-
jobsStarted: boolean
-
paused: number
-
percent: number
-
remaining: number
-
status: "done" | "not-started" | "failed"
-
total: number