예제 #1
0
 def post(self):
     article = ndb.Key('Article', self.request.get('id')).get()
     print "Fetching article with ID", self.request.get('id')
     try:
         article.fetch_now()
     except Exception as e:
         article.fetch_failed = True
         article.put()
         ErrorReport.with_current_exception('article_fetch')
예제 #2
0
 def post(self):
     source = ndb.Key('Source', self.request.get('id')).get()
     print "Fetching source with id", self.request.get('id')
     try:
         source.fetch_now()
     except Exception as e:
         source.last_fetch_failed = True
         source.put()
         ErrorReport.with_current_exception('source_fetch')
     source.enqueue_fetch()