Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/real-queue/lib/hooks/useProgress"

Index

Functions

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
          • Parameters

            • data: AdditionalData

            Returns void

      • onCancel: () => void
          • (): void
          • Returns 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

Generated using TypeDoc