Canceling and then retrying a bunch of tasks
Canceling and then retrying a bunch of tasks
- Subject: Canceling and then retrying a bunch of tasks
- From: Rick Mann <email@hidden>
- Date: Mon, 07 Dec 2015 17:06:25 -0800
I have a situation in which it's sometimes necessary to cancel a bunch of in-flight download tasks, then re-issue them. The problem is, the URLs need to change.
Here's what happens. I make a request for a catalog of files. The response contains a bunch of signed S3 URLs. I then issue a download task for each of those URLs on a session.
If it takes too long to complete, the URLs expire, and I start getting 403 responses from S3. At this point, I want to cancel all remaining tasks, and issue a single request to the catalog again. Then I'll issue new downloads for any files I didn't already get.
I don't see a good way to do this, though. I don't see any way to be sure that all the canceled tasks canceled or completed, because I don't necessarily get a call back to tell me each one is canceled. Any of them could complete just before or just after I cancel (or at the same time).
Is there any way to address this? Thanks.
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden