Support for commands handling
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
class BaseWorker:
|
||||
def __init__(self, **args):
|
||||
for arg, value in args.items():
|
||||
setattr(self, arg, value)
|
||||
self._setup()
|
||||
|
||||
def _setup(self):
|
||||
return
|
||||
|
||||
@abstractmethod
|
||||
def status_update(self, **args):
|
||||
...
|
||||
|
||||
def format_topic(self, *args):
|
||||
return '/'.join([self.topic_prefix, *args])
|
||||
Reference in New Issue
Block a user