I am using celery 4.0 and was following this site. http://docs.celeryproject.org/en/latest/userguide/tasks.html#blog-tasks-py
views.py
task = test2.delay(document.name, document.id)
Tasks.py
@shared_task(name="test2")
def test2(param, job_id):
return 'The test task executed with argument "%s" ' % param
However, it throws an exception TypeError: test2() takes exactly 1 argument (2 given). This is funny since i have 2 arguments and it works in the site i shown.