Skip to main content

自治芹菜

项目描述

异步任务通过 celery 执行。pyramid_celery 用于将 celery 与 Pyramid 相关的东西集成。pyramid_beaker 用于缓存响应。

任务:

从 Autonomie 调用的异步任务

调度器:

不断重复的节拍任务(如 cron 任务)

结果

不使用结果后端,任务直接与 Autonomie 的数据库交互以返回数据。

Autonomie celery 提供了所有应该用于存储任务执行相关内容的模型(参见 autonomie_celery.models)。

安装

系统包

autonmie_celery 需要一个 redis 服务器来运行

在 Debian 上

apt-get install redis-server

在 Fedora 上

dnf install redis-server

蟒蛇的东西

autonomie_celery 应该在与 Autonomie 相同的环境中运行: https ://github.com/CroissanceCommune/autonomie

你可以先运行

workon autonomie
git clone https://github.com/CroissanceCommune/autonomie_celery.git
cd autonomie_celery
python setup.py install
cp development.ini.sample development.ini

根据需要自定义 development.ini 文件

启动它

启动以下命令以启动工作守护程序:

celery worker -A pyramid_celery.celery_app --ini development.ini

启动以下命令以启动节拍守护程序:

celery beat -A pyramid_celery.celery_app --ini development.ini

项目详情


发布历史 发布通知| RSS订阅