用户工具

站点工具


google:gae:task-queue-application

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

google:gae:task-queue-application [2011/10/13 09:56] (当前版本)
行 1: 行 1:
 +====== GAE任务队列(Task Queue)应用 ======
 +
 +===== 配置队列 =====
 +
 +queue.yaml
 +
 +<code yaml>
 +total_storage_limit:​ 120M
 +queue:
 +- name: large
 +  rate: 10/s
 +</​code>​
 +
 +===== 添加任务=====
 +
 +<code python>
 +from google.appengine.api import taskqueue
 +
 +q = taskqueue.Queue('​large'​)
 +t = taskqueue.Task(url='/​large',​ params={'​pic_url':​ pic_path}, target='​large'​)
 +q.add(t) ​
 +</​code>​
 +
 +
  
google/gae/task-queue-application.txt · 最后更改: 2011/10/13 09:56 (外部编辑)