You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for object-oriented WorkerSettings classes #472
In the current implementation, we're only looking at the __dict__ of the user's provided WorkerSettings class, which can be quite misleading if you're trying to get a large multi-queue system set up. The on_startup/on_shutdown hooks are similarly only allowed to be plain functions or @staticmethod, but not @classmethod because those aren't directly callable.
I hit this too. I discovered both the __dict__ and @staticmethod limitations. I've run out of ideas to work around this. My configs are copy/pastes of each other with little bits changed which goes against good principles. Also, I want to be able to subclass a production settings class and change a queue name, so I can write an integration test that won't be affected by a running system on the side.
Activity
qfreewilll commentedon Jun 11, 2025
I hit this too. I discovered both the
__dict__and@staticmethodlimitations. I've run out of ideas to work around this. My configs are copy/pastes of each other with little bits changed which goes against good principles. Also, I want to be able to subclass a production settings class and change a queue name, so I can write an integration test that won't be affected by a running system on the side.