async def msg_plugin_trigger_done(self, msg): if msg.ptid not in self.ptids: raise UnknownSubscriptionError() runner = self.ptids[msg.ptid] runner.checks += msg.checks runner.future.set_result(None) del self.ptids[msg.ptid]
async def msg_plugin_trigger_error(self, msg): if msg.ptid not in self.ptids: raise UnknownSubscriptionError() runner = self.ptids[msg.ptid] runner.checks += msg.checks runner.future.set_exception(msg.err) del self.ptids[msg.ptid]
async def msg_plugin_query_result(self, msg): if msg.pqid not in self.pqids: raise UnknownSubscriptionError() runner = self.pqids[msg.pqid] runner.checks += msg.checks runner.future.set_result(msg.result) del self.pqids[msg.pqid]
async def msg_cancel_subscription(self, msg): if msg.qid in self.subs: self.subs[msg.qid].cancel() del self.subs[msg.qid] self.send_msg(messages.MsgSubscriptionCancelled(qid=msg.qid, )) else: raise UnknownSubscriptionError()
async def msg_plugin_handler_unregister(self, msg): if msg.phid not in self.phids: raise UnknownSubscriptionError() self.conn.unregister_plugin_handler(self.phids[msg.phid]) del self.phids[msg.phid] self.send_msg(messages.MsgPluginHandlerUnregistered(phid=msg.phid))
async def msg_plugin_broadcast_result(self, msg): if msg.pbid not in self.pbids: raise UnknownSubscriptionError() self.pbids[msg.pbid].future.set_result(msg.results) del self.pbids[msg.pbid]
async def msg_plugin_method_error(self, msg): if msg.pmid not in self.pmids: raise UnknownSubscriptionError() self.pmids[msg.pmid].future.set_exception(msg.err) del self.pmids[msg.pmid]
async def msg_plugin_method_result(self, msg): if msg.pmid not in self.pmids: raise UnknownSubscriptionError() self.pmids[msg.pmid].future.set_result(msg.result) del self.pmids[msg.pmid]