You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
331 B
Python

# -*- coding: utf-8 -*-
import sys
from celery import Celery
app = Celery('MBRTUSTask') # 创建 Celery 实例
app.config_from_object('CeleryConfig') # 通过 Celery 实例加载配置模块
app.start(argv=['celery', '-A', 'MBRTUSTask', 'worker', '-l', 'info', '-P', 'solo', '-c', '2', '--purge'])