Пример #1
0
 def get_typing_handler(self):
     if self.config.worker.writers.typing == self.get_instance_name():
         return TypingWriterHandler(self)
     else:
         return FollowerTypingHandler(self)
Пример #2
0
 def get_typing_writer_handler(self) -> TypingWriterHandler:
     if self.get_instance_name() in self.config.worker.writers.typing:
         return TypingWriterHandler(self)
     else:
         raise Exception("Workers cannot write typing")