mirror of
https://github.com/hequan2017/seal.git
synced 2026-02-03 18:23:34 +08:00
12 lines
263 B
Python
12 lines
263 B
Python
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") |