import { AMongoQueue, IMongoQueueOptions } from './AMongoQueue'; export class AMongoQueueList { queueList: AMongoQueue[] = []; optionList: IMongoQueueOptions[] = []; constructor (optionList: IMongoQueueOptions[]) { this.queueList = optionList.map((item) => { return new AMongoQueue(item); }); } async add(items) { for (const queue of this.queueList) { await queue.add(items); } } async send() { for (const queue of this.queueList) { await queue.send(); } } }