With the way how downloadAllNewFiles calls downloadNewFilesFromDir in a loop, the Downloader will always first copy all new files from the first discovered supported directory before scanning the second supported directory for new files and so forth.
Need to find a way for downloadNewFilesFromDir to queue copying of new files instead of actually copying them in a loop.
Note: I do not want to 'simply' queue copying using Node's built-in workers pool (i.e. by removing the await for the this.fileCopier.copy call) since that would result in copying multiple files in parallel which I do not feel will bring any value since all files are to be read from the same memory card and to be written to the same disk (block device) and so parallel workers would just end up competing with each other for the same limited IO resources.
With the way how
downloadAllNewFilescallsdownloadNewFilesFromDirin a loop, theDownloaderwill always first copy all new files from the first discovered supported directory before scanning the second supported directory for new files and so forth.Need to find a way for
downloadNewFilesFromDirto queue copying of new files instead of actually copying them in a loop.Note: I do not want to 'simply' queue copying using Node's built-in workers pool (i.e. by removing the
awaitfor thethis.fileCopier.copycall) since that would result in copying multiple files in parallel which I do not feel will bring any value since all files are to be read from the same memory card and to be written to the same disk (block device) and so parallel workers would just end up competing with each other for the same limited IO resources.