【问题标题】:GAE: Queues, Quotas and backend instancesGAE:队列、配额和后端实例
【发布时间】:2026-02-21 05:15:02
【问题描述】:

我有一个队列,里面有很多任务。我想使用一个后端实例来处理这个队列。我的配额信息告诉我,我在数百个前端实例小时数上超出了预算,并且没有使用任何后端实例小时数。由于我只配置了一个后端实例,我预计每小时收费不超过 1 个(后端)实例小时。这是我的配置:

后端.yaml

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

queue.yaml

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

在我的脚本中添加任务到队列

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

账单状态

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

任务标题

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)

【问题讨论】:

标签: google-app-engine gae-quotas


【解决方案1】:

我需要部署我的后端代码:

appcfg.py backends update dir instance_name

【讨论】: