1

我试图将 xhtml2pdf 导入到我的 tasks.py 文件中。但是,当我导入它时,没有任何任务完成,只要我删除导入行,它就会再次工作。没有错误,它只是什么都不做。

任务.py:

from celery import task

import xhtml2pdf.pisa as pisa

@task
def some_task():
    return "HELLO"

python manage.py celeryd -E -B -l DEBUG

就这样:

  . recurring_invoice.tasks.send_email
  . recurring_invoice.tasks.send_invoice

[2015-06-10 20:54:14,549: INFO/Beat] beat: Starting...
[2015-06-10 20:54:14,555: INFO/Beat] Writing entries...
[2015-06-10 20:54:14,588: INFO/MainProcess] Connected to amqp://guest:**@127.0.0.1:5672//
[2015-06-10 20:54:14,613: INFO/MainProcess] mingle: searching for neighbors
[2015-06-10 20:54:15,630: INFO/MainProcess] mingle: all alone

/Users/hermanstander/apps/afriapps/stem/env/lib/python2.7/site-packages/djcelery/loaders.py:136: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
  warn('Using settings.DEBUG leads to a memory leak, never '

[2015-06-10 20:34:13,870: WARNING/MainProcess] /Users/hermanstander/apps/afriapps/stem/env/lib/python2.7/site-packages/djcelery/loaders.py:136: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
  warn('Using settings.DEBUG leads to a memory leak, never '

[2015-06-10 20:34:13,870: WARNING/MainProcess] celery@Hermans-MacBook-Air.local ready.
[2015-06-10 20:34:13,870: DEBUG/MainProcess] | Worker: Hub.register Pool...
[2015-06-10 20:34:13,871: DEBUG/MainProcess] basic.qos: prefetch_count->16

我使用 Django 1.8,python 2.7

4

0 回答 0