Exemplo n.º 1
0
 def fetch_and_process(url):
     logging.debug("Following url %s" % url)
     response = raw_request(url, oauth_token=app.config['GITHUB_OAUTH_KEY'])
     links = parse_link_value(response.headers.get('Link', ''))
     prs = json.loads(response.content)
     for pr in prs:
         taskqueue.add(url="/tasks/update-issue/%i" % pr['number'])
     for (link_url, info) in links.items():
         if info.get('rel') == 'next':
             fetch_and_process(link_url)
Exemplo n.º 2
0
 def fetch_and_process(url):
     logging.debug("Following url %s" % url)
     response = raw_request(url, oauth_token=app.config['GITHUB_OAUTH_KEY'])
     link_header = parse_link_header(response.headers.get('Link', ''))
     prs = json.loads(response.content)
     for pr in prs:
         taskqueue.add(url="/tasks/update-issue/%i" % pr['number'])
     for link in link_header.links:
         if link.rel == 'next':
             fetch_and_process(link.href)