Ejemplo n.º 1
0
 def on_remote_stop_transaction(self, **kwargs):
     """Handle remote stop request."""
     if self.accept is True:
         return call_result.RemoteStopTransactionPayload(
             RemoteStartStopStatus.accepted)
     else:
         return call_result.RemoteStopTransactionPayload(
             RemoteStartStopStatus.rejected)
Ejemplo n.º 2
0
 def remote_stop_transaction_notification(self, **kwargs):
     print("remote_stop_transaction receive is ", kwargs)
     print(
         "2.client receive remote stop transaction request and will return accepted"
     )
     return call_result.RemoteStopTransactionPayload(
         status=RemoteStartStopStatus.accepted)
Ejemplo n.º 3
0
 def on_remote_start_transaction(self, **kwargs):
     """Handle remote start request."""
     if self.accept is True:
         asyncio.create_task(self.send_start_transaction())
         return call_result.RemoteStartTransactionPayload(
             RemoteStartStopStatus.accepted)
     else:
         return call_result.RemoteStopTransactionPayload(
             RemoteStartStopStatus.rejected)
Ejemplo n.º 4
0
 def on_remote_stop_transaction(self, transaction_id):
     print('STOP aceptado para transaccion: ',transaction_id)
     return call_result.RemoteStopTransactionPayload(
         status=RemoteStartStopStatus.accepted
     )