Пример #1
0
 def _register_domain_req_handlers(self):
     super()._register_domain_req_handlers()
     self.node.write_manager.register_req_handler(
         BuyHandler(self.node.db_manager))
     self.node.write_manager.register_req_handler(
         RandomBuyHandler(self.node.db_manager))
     self.node.read_manager.register_req_handler(
         GetBuyHandler(self.node.db_manager))
Пример #2
0
def prepare_for_state(result):
    if get_type(result) == "buy":
        key, value = GetBuyHandler.prepare_buy_for_state(result)
        return key, value
Пример #3
0
 def register_domain_req_handlers(self):
     super().register_domain_req_handlers()
     self.write_manager.register_req_handler(BuyHandler(self.db_manager))
     self.read_manager.register_req_handler(GetBuyHandler(self.db_manager))