celery简单使用 安装celery 安装celery: pip3 install celery 安装redis 创建tasks.py文件进行验证 from celery import Celery import time app = Celery('TASK', broker='redis://localhost', backend='redis://localhost') @app.task def add(x, y): print("running..add.", x, y) return x + y @app.task