import { AEsQueue, IEsQueueOptions } from './AEsQueue'; export class AEsQueueList { queueList: AEsQueue[] = []; optionList: IEsQueueOptions[] = []; constructor (optionList: IEsQueueOptions[]) { this.queueList = optionList.map((item) => { return new AEsQueue(item); }); } async add(items) { console.info(`%c---------EsQueueList add ${items.length} --------- `, 'background:yellow; color:blue; font-weight:600;'); for (const queue of this.queueList) { await queue.add(items); } } async send(items) { console.info('\n%c--------- EsQueueList send --------- \n', 'background:yellow; color:blue; font-weight:600;'); for (const queue of this.queueList) { await queue.send(); } } }