# -*- coding: utf-8 -*- import sys from celery import Celery app = Celery('MBTCPSTask', task_cls = 'MBTCPSTask:ModBusTCPSTask') # 创建 Celery 实例 app.config_from_object('CeleryConfig') # 通过 Celery 实例加载配置模块