Support for commands handling

This commit is contained in:
zewelor
2017-11-26 21:57:12 +01:00
parent 09d1332b92
commit 6a1c7b0181
8 changed files with 160 additions and 70 deletions
+17
View File
@@ -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])