coleifer / huey

a little task queue for python
https://huey.readthedocs.io/
MIT License
5.2k stars 370 forks source link

Clarify whether class methods are supported or not #816

Closed dabeeeenster closed 1 month ago

dabeeeenster commented 1 month ago

Thanks for the library!

I'm trying to async a class method but getting TypeError: EmailClient.send_email() missing 1 required positional argument: 'self' error. Am I right in assuming that huey only supports regular functions and not class methods? I couldnt find this in the docs?

Happy to provide a PR to the docs if that's the case.

coleifer commented 1 month ago

No classmethods are not supported, it must be a regular function. Your regular function can then call any classmethods if you wish to do that, of course.