-}
-
-const downloadImageQueue = queue<DownloadImageQueueTask, Error>((task, cb) => {
- downloadImage(task.fileUrl, CONFIG.STORAGE.ACTOR_IMAGES, task.filename, task.size)
- .then(() => cb())
- .catch(err => cb(err))
-}, QUEUE_CONCURRENCY.ACTOR_PROCESS_IMAGE)
-
-function pushActorImageProcessInQueue (task: DownloadImageQueueTask) {
- return new Promise<void>((res, rej) => {
- downloadImageQueue.push(task, err => {
- if (err) return rej(err)
+}) {
+ const downloaderOptions = {
+ url: options.fileUrl,
+ destDir: CONFIG.STORAGE.ACTOR_IMAGES,
+ destName: options.filename,
+ size: options.size
+ }