GAE: Queues, Quotas and backend instances

隐身守侯 提交于 2019-12-13 00:02:55

问题


I have a queue with a lot of tasks in it. I would like to use one backend instance to process this queue. My quota info tells me I have blown my budget on hundreds of frontend instance hours and have not used any backend instance hours. As I had configured only one backend instance, I was expecting to be charged no more than 1 (backend) instance hour per hour. Here is my configuration:

backends.yaml

backends:
- name: worker
  class: B8
  instances: 1
  options:dynamic

queue.yaml

- name: import
  rate: 20/s
  bucket_size: 40

adding tasks to queue in my script

deferred.defer(importFunction, _target='worker', _queue="import")

bill status

Resource                     Usage   
Frontend Instance Hours      198.70 Instance Hours      
Backend Instance Hours       0.00 Instance Hours    

Task Headers

X-AppEngine-Current-Namespace   
Content-Type    application/octet-stream
Referer http://worker.appname.appspot.com/_ah/queue/deferred
Content-Length  1619
Host    worker.appname.appspot.com
User-Agent  AppEngine-Google; (+http://code.google.com/appengine)

回答1:


I needed to deploy my backend code:

appcfg.py backends update dir instance_name


来源:https://stackoverflow.com/questions/11805737/gae-queues-quotas-and-backend-instances

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!