def get(self): q = taskqueue.Queue('pull-queue') tasks = q.lease_tasks(30, 1000) logging.info(len(tasks)) if len(tasks)>0: bq_loader = BQLoader() rows=[] for task in tasks: rows.append({'insertId': task.payload, 'json':json.loads(task.payload)}) logging.info(rows) bq_loader.insert_rows(rows) q.delete_tasks(tasks) self.response.write('ok')
def get(self): bq_loader = BQLoader() bq_loader.create_table() self.response.write('ok')