Google app engine cannot instantiate task queues m

2019-03-16 16:59发布

I have defined the backend configuration as follows.

 backends:
 - name: mybackend
   class: B8
   options: public, dynamic
   instances: 6

And Um creating more than 6 taskqueue instances and given the target to my backend.

 class TestHandlerTest(RequestHandler):
    def get(self):
         for x in range(0, 100):
             taskqueue.add(url='/testhandler/', method='GET',      params={'x': x},
                        target='mybackend')
         return Response()


 class TestHandler(RequestHandler):
     def get(self):
         time.sleep(420)
         x = self.request.args.get('x')
         return Response()

In GAE taskqueue only getting queued with 6 taskqueue instances . It wont run up to 100. If we use front ends the taskqueue getting queued with all the taskqueues .

Why cannot we queued more than the tasks specified backend instance limit in google app engine? Can any one help?

1条回答
甜甜的少女心
2楼-- · 2019-03-16 17:33

You have configured 6 backend instances. You can add as many push tasks as you want to these backends. To do this you have to target the backend instance for each task you add. So target = '1.mybackend' for the first instance and '2.mybackend' for the second backend inatnce.

查看更多
登录 后发表回答