• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Canceling and then retrying a bunch of tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Canceling and then retrying a bunch of tasks
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: How to use NWTCPConnectionAuthenticationDelegate for self signed certificate
  • Next by Date: Re: Canceling and then retrying a bunch of tasks
  • Previous by thread: Re: Problem with connection via Proxy using CFNetwork in TCP stream
  • Next by thread: Re: Canceling and then retrying a bunch of tasks
  • Index(es):
    • Date
    • Thread