UNPKG

redis-cloud-api-sdk

Version:
30 lines (29 loc) 1.03 kB
import { TaskObject, TaskStatus } from '../types/task'; import { Client } from './api.base'; export declare class Task { protected client: Client; constructor(client: Client); /** * Waiting for task status to change to a given status * @param taskId The id of the task * @param expectedStatus The expected status * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds */ waitForTaskStatus(taskId: number, expectedStatus: TaskStatus, timeoutInSeconds?: number, sleepTimeInSeconds?: number): Promise<TaskObject & { [key: string]: any; }>; /** * Returning a lookup list of tasks owned by the account */ getTasks(): Promise<TaskObject[] & { [key: string]: any; }>; /** * Returning a task * @param taskId The id of the task */ getTask(taskId: number): Promise<TaskObject & { [key: string]: any; }>; }