Skip to content

Keep scanning supported directories in parallel with copying files found in the first directory #12

Description

@andreiled

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions