Ejemplo n.º 1
0
def f(bibcode):
      try:
        doc = adsdata.get_metrics_data(bibcode, manipulate=False)
        doc['author_num'] = max(doc['author_num'],1)
      except:
        doc = {}
      return doc
Ejemplo n.º 2
0
 def run(self):
     while True:
         bibcode = self.task_queue.get()
         if bibcode is None:
             break
         try:
             doc = adsdata.get_metrics_data(bibcode, manipulate=False)
             doc['author_num'] = max(doc['author_num'],1)
             self.result_queue.put(doc)
         except MongoQueryError, e:
             app.logger.error("Mongo metrics data query for %s blew up (%s)" % (bibcode,e))
             raise
Ejemplo n.º 3
0
 def run(self):
     while True:
         bibcode = self.task_queue.get()
         if bibcode is None:
             break
         try:
             pubyear = int(bibcode[:4])
             doc = adsdata.get_metrics_data(bibcode, manipulate=False)
             try:
                 citations = doc.get('citations',[])
             except:
                 citations = []
             self.result_queue.put({'citations':citations})
         except MongoQueryError, e:
             app.logger.error("Mongo citation list query for %s blew up (%s)" % (bibcode,e))
             raise