Last active
September 14, 2017 13:47
-
-
Save mwrites/c8fb296c2b9c6564916a0040b9c347f2 to your computer and use it in GitHub Desktop.
JobQueueCenter DocumentUploadService Usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func upload(fileToUpload: Data) { | |
//this | |
DocumentUploadService(document: fileToUpload).execute { | |
... | |
} | |
//becomes that | |
let job = DocumentUploadService(document: fileToUpload) | |
JobQueueCenter.current.enqueue(job: job) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment