-
Notifications
You must be signed in to change notification settings - Fork 47
How to correctly track a Task's progress? #260
Comments
Whoops, just saw #259, I'll be following that instead |
BTW: I updated my project to use the latest from master and I am seeing a difference in progress report, however the change is not exactly what I'm looking for: The |
If you guys need a reproduceable project, you can clone |
Thanks, that's quite helpful! Task's progress assumes that the "original" task is a larger piece of the job, and chaining done on it forms a smaller part. That assumption is non-ideal in your network request method. At a high level, I recommend performing one's |
I have no idea on how to implement this using the current
This way, when a simple Task is created with no I don't know if this rambling makes much sense but thanks for hearing me out! |
Any news on this? I'm very close to shipping the final version of the app to the client and I'd like to correctly do this if possible, otherwise I'd have to workaround this (temporary) limitation using |
I haven't been able to return to it until very recently. I hope to have something today, and I'm sorry if that's too late for you. |
No worries Zach, I completely understand! Thanks a lot for your effort |
No @zwaldowski, thank YOU! |
Hi there!
I've written a URLSession extension that allows you to upload a file and wrap it in a task like this:
As you see, I'm using the
URLSessionUploadTask
's progress to initialise the Task. After that, I'm usingandThen
to parse the JSON response from the server and more cleanup.However, when observing the progress, the upload task is merely a fraction of the total progress, not corresponding to the much more heavier task that it represents.
How should we proceed in such cases? I realise this is more a
NSProgress
question than a Deferred question, but maybe someone can shed some light on this. You can see this behaviour in this commit of my project which is based on BNRDeferredBTW: Really looking forward to version 4.0 of Deferred 💪
The text was updated successfully, but these errors were encountered: