Beispiel #1
0
 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]
Beispiel #2
0
 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]
Beispiel #3
0
 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]
Beispiel #4
0
 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()
Beispiel #5
0
 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))
Beispiel #6
0
 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]
Beispiel #7
0
 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]
Beispiel #8
0
 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]