retrieveTaskResult | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function retrieveTaskResult

    Get the result of a scheduled task

    Task to look up

    How long to wait for the task to finish

    acceptCancel: Don't throw if the task is cancelled acceptTempFailure: Don't throw if the task is temporarily failed but will still retry acceptTimeout: Return null in case of timeout (by default, throws)

    The result of the task

    if the task is cancelled, failed or timed out

    • Type Parameters

      • T

      Parameters

      • taskId: number
      • timeout: number
      • Optionaloptions: { acceptTimeout: false }

      Returns Promise<T>

      WH5.7 expects timeout to be combined into the options parameter

    • Type Parameters

      • T

      Parameters

      • taskId: number
      • timeout: number
      • Optionaloptions: { acceptTimeout: boolean }

      Returns Promise<undefined | T>

      WH5.7 expects timeout to be combined into the options parameter

    • Type Parameters

      • T

      Parameters

      • taskId: number
      • options: RetrieveTaskResultOptions & { acceptTimeout: true }

      Returns Promise<undefined | T>

      WH5.7 expects timeout to be combined into the options parameter

    • Type Parameters

      • T

      Parameters

      • taskId: number
      • Optionaloptions: RetrieveTaskResultOptions

      Returns Promise<T>

      WH5.7 expects timeout to be combined into the options parameter