惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
腾讯CDC
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
Vercel News
Vercel News
P
Proofpoint News Feed
雷峰网
雷峰网
博客园_首页
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
V
V2EX
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
S
SegmentFault 最新的问题

博客园 - 文刀无尽

在Django 中更新mongodb的ListField字段 图片加到json中,提交到服务器端处理异常问题。 在django中使用时django-nonrel,'django.contrib.auth'不能用的问题 在mac 上安装 mpkg 在bluehost上安装mongodb 为什么要使用Rabbitmq 在bluehost上安装pytoh 2.7.2 为android 启动的时候添加splash 折腾了半天,ajax 在模拟器下正常,在一台2.1机器上正常,在我的小米2.3下不工作 去掉默认标题栏且将应用设置为全屏 java 基本语法 在jquery mobile中页面跳转的时候,实现登录检查 去掉jquery mobile 的阴影效果 Eclipse 的 javascript 插件 iphone phonegap中跨域的问题 使用jquery mobile 经验 另类随机读大表数据 (原创)自已实现服务器控件之 TextBox 控件 (原创)自已实现服务器控件系列 之 设计时可用鼠标拖动大小的Label控件
Celery使用数据库代替rabbitmq
文刀无尽 · 2012-03-06 · via 博客园 - 文刀无尽

出于前期用户不多,而且是部署在bluehost,出于简单考虑,用数据库代替rabbitmq. 

安装

先安装django-kombu:

$ pip install -U django-kombu

配置

可以直接使用原来的DATABASES数据库设置。

  1. 设置 broker transport:

  2. 添加到INSTALLED_APPS:

    INSTALLED_APPS = ("djkombu", ) 
  3. 验证数据库设置:

    DATABASE_ENGINE = "mysql" DATABASE_NAME = "mydb" DATABASE_USER = "myuser" DATABASE_PASSWORD = "secret" 

  1. 同步数据库:

    $ python manage.py syncdb

限制

当前不支持

  • 远程控制命令 (celeryev, broadcast)
  • 事件,包括 Django Admin monitor.
  • Using more than a few workers (can lead to messages being executed multiple times).

posted @ 2012-03-06 15:50  文刀无尽  阅读(983)  评论()    收藏  举报