Python 芹菜守护程序生产无法导入芹菜错误

Python 芹菜守护程序生产无法导入芹菜错误,python,celery,celery-task,celerybeat,celeryd,Python,Celery,Celery Task,Celerybeat,Celeryd,我遵循芹菜医生的所有指示。首先,我按照创建生产流程,这是我的应用程序代码 1-test_芹菜/芹菜.py:- from __future__ import absolute_import import os from celery import Celery from kombu import Queue, Exchange from celery.schedules import crontab import datetime app = Celery('test_celery',

我遵循芹菜医生的所有指示。首先,我按照创建生产流程,这是我的应用程序代码

1-test_芹菜/芹菜.py:-

from __future__ import absolute_import
import os
from celery import Celery
from kombu import Queue, Exchange
from celery.schedules import crontab
import datetime

app = Celery('test_celery',
             broker='amqp://jimmy:jimmy123@localhost/jimmy_v_host',
             backend='rpc://',
             include=['test_celery.tasks'])
# Optional configuration, see the application user guide.
app.conf.update(
    result_expires=3600,
)

if __name__ == '__main__':
    app.start()
2-test_芹菜.task.py:-

from __future__ import absolute_import
from test_celery.celery import app
import time
from kombu import Queue, Exchange
from celery.schedules import crontab
import datetime


app.conf.beat_schedule = {
    'planner_1': {
        'task': 'test_celery.tasks.printTask',
        'schedule': crontab(minute='*/1'),
    },
}
@app.task
def printTask():
    print 'Hello i am running'
    time=str(datetime.datetime.now())
    file=open('/home/hub9/myproj/data.log','ab')
    file.write(time)
    file.close()
3-:我的配置文件/etc/default/celeryd符合说明:

# Names of nodes to start
#   most will only start one node:
#CELERYD_NODES="worker1"
#   but you can also start multiple and configure settings
#   for each in CELERYD_OPTS (see `celery multi --help` for examples).
CELERYD_NODES="worker1 worker2 worker3"

# Absolute or relative path to the 'celery' command:
CELERY_BIN="/usr/local/bin/celery"
#CELERY_BIN="/virtualenvs/def/bin/celery"

# App instance to use
# comment out this line if you don't use an app
CELERY_APP="mycelery.test_celery"
# or fully qualified:
CELERY_APP="test_celery.celery:app"

# Where to chdir at start. path to folder containing task
CELERYD_CHDIR="/home/hub9/mycelery/test_celery/"

# Extra command-line arguments to the worker
CELERYD_OPTS="--time-limit=3000 --concurrency=3 --config=celeryconfig"

# %N will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/var/log/celery/%N.log"
CELERYD_PID_FILE="/var/run/celery/%N.pid"

# Workers should run as an unprivileged user.
#   You need to create this user manually (or you can choose
#   a user/group combination that already exists, e.g. nobody).
CELERYD_USER="celery"
CELERYD_GROUP="celery"
**当我运行sudo service celeryd start时,我的生产工人正在启动,但我的项目出现错误,无法导入芹菜模块。我读了一些答案,但无法解决我的问题。**谢谢你的时间