Celery has experimental support for using methods as tasks since version 3.0.
The documentation for this is in celery.contrib.methods
, and also mentions some caveats you should be aware of:
https://docs.celeryproject.org/en/3.1/reference/celery.contrib.methods.html
Be aware: support for contrib.methods
removed from Celery since 4.0