发布时间:2019-09-05 07:06:10编辑:auto阅读(2329)
redis
python3.6 -m pip install 'dramatiq[redis, watch]'
import dramatiq
import requests
from dramatiq.brokers.redis import RedisBroker
redis_broker = RedisBroker(host="127.0.0.1", port=6379)
dramatiq.set_broker(redis_broker)
@dramatiq.actor
def count_words(url):
print(url)
count_words.send("http://example.com")
// watch . 代码 动态检测 代码是否更新,然后自动重启
dramatiq example --watch .
上一篇: Python 之 SSH简单实例
下一篇: Python 前端框架【Bootstra
47863
46424
37314
34761
29332
25990
24945
19967
19564
18050
5806°
6433°
5949°
5975°
7080°
5926°
5963°
6456°
6418°
7798°