TypeError: autodiscover_tasks() takes at least 2 arguments (1 given) celery

The solution for “TypeError: autodiscover_tasks() takes at least 2 arguments (1 given) celery” can be found here. The following code will assist you in solving the problem.

from django.apps import apps
app.autodiscover_tasks(lambda: [n.name for n in apps.get_app_configs()])

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in