$ pip install huey python from huey import RedisHuey @huey.task() def hello(name): print('Hello', name) python hello('Alice') python from huey import crontab @huey.periodic_task(crontab(minute='*/1')) def every_minute_task(): print('This task will run every minute') python python from config import HUEY_BACKEND, HUEY_TASK_TIMEOUT huey = HUEY_BACKEND $ huey_consumer.py config --workers 4


上一篇:
下一篇:
切换中文