PromiseQueue
import { PromiseQueue } from "https://raw.githubusercontent.com/egoist/promise-queue/master/src/index.ts";
class PromiseQueue<TProcessArgs extends any[]> { }
maxConcurrent: number;
numRunning: number;
process: ProcessCallback<TProcessArgs>;
processed: Set<string>;
processing: Set<string>;
queue: Array<[string, TProcessArgs]>;
reject: ((error: Error) => void) | null;
resolve: ((processed: Set<string>) => void) | null;
retry: boolean;
runPromise: Promise<Set<string>> | null;
private _next();
private _reset();
private async _runJob(job: string, args: TProcessArgs);
add(job: string, ...args: TProcessArgs);
run();