Exemplo n.º 1
0
    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')
Exemplo n.º 2
0
    def get(self):
        bq_loader = BQLoader()
        bq_loader.create_table()

        self.response.write('ok')
Exemplo n.º 3
0
    def get(self):
        bq_loader = BQLoader()
        bq_loader.create_table()

        self.response.write('ok')