queue-manager-pro
Version:
A flexible, TypeScript-first queue/task manager with pluggable backends ,dynamic persistence storage and event hooks.
81 lines (80 loc) • 2.14 kB
TypeScript
declare const errors: {
TASK_PROCESSING_TIMEOUT: {
path: string[];
message: string;
};
TASK_MAX_RETRIES_EXCEEDED: {
path: string[];
message: string;
};
TASK_MAX_RETRIES_LIMIT: {
path: string[];
message: string;
};
INVALID_HANDLER_PARAMS: {
path: string[];
message: string;
};
HANDLER_NOT_REGISTERED: {
path: string[];
message: string;
};
UNKNOWN_BACKEND_TYPE: {
path: string[];
message: string;
};
REPO_FILE_LOAD: {
path: string[];
message: string;
};
REPO_FILE_TYPE_MISMATCH: {
path: string[];
message: string;
};
REPO_FILE_READ: {
path: string[];
message: string;
};
REPO_REDIS_SAVE_TASKS: {
path: string[];
message: string;
};
};
declare class CustomError extends Error {
code: keyof typeof errors;
path: string[];
constructor(code: keyof typeof errors, ...args: any[]);
private formatMessage;
toString(): string;
}
export declare class TaskProcessingTimeoutError extends CustomError {
constructor();
}
export declare class TaskMaxRetriesExceededError extends CustomError {
constructor(taskId: string, errorMessage: string);
}
export declare class HandlerNotRegisteredError extends CustomError {
constructor(handlerName: string);
}
export declare class MaxRetriesLimitError extends CustomError {
constructor(maxRetries: number);
}
export declare class UnknownBackendTypeError extends CustomError {
constructor();
}
export declare class InvalidHandlerParamsError extends CustomError {
constructor(details?: string);
}
export declare class FileRepositoryLoadError extends CustomError {
constructor(filePath: string, path: string);
}
export declare class FileRepositoryTypeMismatchError extends CustomError {
constructor();
}
export declare class FileRepositoryReadError extends CustomError {
constructor(filePath: string, details: string);
}
export declare class RedisRepositorySaveTasksError extends CustomError {
constructor();
}
export {};