Unable to handle DeadlineExceededError while using UrlFetch
问题 I have this basic utility class fetches (possibly) shortened URLs in parallel and returns a dictionary that has final URLs. It uses the wait_any functionality that was described in this blog post. class UrlFetcher(object): @classmethod def fetch_urls(cls,url_list): rpcs = [] for url in url_list: rpc = urlfetch.create_rpc(deadline=5.0) urlfetch.make_fetch_call(rpc, url,method = urlfetch.HEAD) rpcs.append(rpc) result = {} while len(rpcs) > 0: rpc = apiproxy_stub_map.UserRPC.wait_any(rpcs) rpcs