pmclanahan / django-celery-email

A Django email backend that uses a celery task for sending the email.
BSD 3-Clause "New" or "Revised" License
477 stars 110 forks source link

Compatibility with Django v5.0 #79

Open kowsari opened 3 years ago

kowsari commented 3 years ago

Hi,

Has anybody been able to get django-celery-email working with celery 5? I have tried to get it running but get an error and not sure of it should work out of the box or there is some compatibility issue.

Thanks

palvarez89 commented 3 years ago

Is it similar to this one?

root@a1c98feef4ff:/code# python celery-task.py worker
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/click_didyoumean/__init__.py", line 34, in resolve_command
    return super(DYMMixin, self).resolve_command(ctx, args)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1314, in resolve_command
    ctx.fail("No such command '{}'.".format(original_cmd_name))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 550, in fail
    raise UsageError(message, self)
click.exceptions.UsageError: No such command 'celery-task.py'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/code/celery-task.py", line 13, in <module>
    app.start()
  File "/usr/local/lib/python3.9/site-packages/celery/app/base.py", line 371, in start
    celery.main(args=argv, standalone_mode=False)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1254, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/usr/local/lib/python3.9/site-packages/click_didyoumean/__init__.py", line 42, in resolve_command
    raise click.exceptions.UsageError(error_msg, error.ctx)
click.exceptions.UsageError: No such command 'celery-task.py'.
DmytroLitvinov commented 3 years ago

Rename the title of issue "Compatibility with Django v5.0" to "Compatibility with celery v5"

tartieret commented 2 years ago

I just tested with Python 3.8 and Celery 5.1.2 and no problem at all The way to start a celery worker is different in Celery 4 and Celery 5, see docs here: https://docs.celeryproject.org/en/stable/history/whatsnew-5.0.html#step-1-adjust-your-command-line-invocation