Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Refactor processUpload function fileUtils #12

Open
dylankb opened this issue Mar 23, 2018 · 1 comment
Open

Refactor processUpload function fileUtils #12

dylankb opened this issue Mar 23, 2018 · 1 comment

Comments

@dylankb
Copy link
Member

dylankb commented Mar 23, 2018

We pass the callback parameter in processUpload down to about four additional methods. It would be nice if we could make this part of the fileUtils a bit easier to read.

@dylankb dylankb changed the title Refactor processUpload in fileUtils Refactor processUpload function fileUtils Mar 23, 2018
@dylankb
Copy link
Member Author

dylankb commented Mar 23, 2018

// A long lived callback
processUpload ->(callback)  ->
                                addManifestToFile -> callback ->
                                           |                          addShardsToManifest -> callback->
                              generateManifest                                           readable.on('end () => fileSystem.write
                                                                                                                          |
			                                                                               callback('$dir/$manifestName')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant