将django-celery作为守护程序运行时出现操作系统错误

时间:2016-04-12 07:24:32

标签: python django django-celery djcelery celeryd

我需要将celery作为守护进程运行。我没有使用主管。相反,我想在系统启动时使用init运行celery。

以下是我使用sudo /etc/init.d/celeryd start

启动芹菜时遇到的错误的回溯
/usr/local/lib/python2.7/dist-packages/django/core/management/base.py:260: RemovedInDjango19Warning: "requires_model_validation" is deprecated in favor of "requires_system_checks".
  RemovedInDjango19Warning)

Traceback (most recent call last):
  File "/var/www/html/halwee/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/djcelery/management/commands/celery.py", line 23, in run_from_argv
    ['{0[0]} {0[1]}'.format(argv)] + argv[2:],
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/celery.py", line 770, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 309, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 450, in setup_app_from_commandline
    os.chdir(workdir)
OSError: [Errno 2] No such file or directory: '"/var/www/html/hello"'

/var/www/html/hello 是我的根django应用程序的路径

我正在关注here的教程。

我在stackoverflow等上浏览了几个答案,发现它可能是一个权限问题。但后来我创建了一个新组和一个用户,并将该组分配给整个django根应用程序。问题仍然存在。

我一直坚持这样做。有谁能告诉我如何解决这个问题?

0 个答案:

没有答案