You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm building an upload queue and I'd like to know if it's possible to add more files after calling throat, e.g.:
`
letuploadedFiles=0constthroat=require('throat')(10)// uploadQueue initially has 20 filesfor(constuploadofuploadQueue){throat(async()=>{// logic for processing uploaduploadedFiles++;console.log({ uploadedFiles,remainingFiles: uploadQueue.length-uploadedFiles})})}// add another file to the queueuploadQueue.push(newUpload)
In the above example, I get { uploadedFiles: 20, remainingFiles: 1 } after the initial 20 files are processed and the queue never gets to the new upload. Is there any way to listen to changes in uploadQueue? Or do I have to call throat again every time I add more items to the queue?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello, I'm building an upload queue and I'd like to know if it's possible to add more files after calling throat, e.g.:
`
In the above example, I get
{ uploadedFiles: 20, remainingFiles: 1 }
after the initial 20 files are processed and the queue never gets to the new upload. Is there any way to listen to changes inuploadQueue
? Or do I have to call throat again every time I add more items to the queue?Thanks in advance.
The text was updated successfully, but these errors were encountered: