0.1.1 增加异步程序 选择

This commit is contained in:
何全
2019-03-19 10:42:02 +08:00
parent 182460ca8e
commit f79661c783
4 changed files with 33 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ python manage.py createsuperuser
python manage.py runserver 0.0.0.0:80
```
* 扩展功能
* 扩展功能-异步1 推荐 定时任务用celery
```bash
#需要安装redis
#启动celery异步任务
@@ -56,6 +56,14 @@ cd seal
celery -B -A seal worker -l info
```
* 扩展功能-异步2 普通异步任务 用 dramatiq
```bash
cd system/decorator/asynchronous/
dramatiq asynchronous --watch . --log-file /tmp/dramatiq.log
```
## 注意
* 如果想直接拿来做生产项目,请重新生成一个 settings 文件里面的 SECRET_KEY
* 时区问题