Example #1
0
 def stop(self):
     from transport import gateway
     from transport import callback
     from transport import bandwidth
     callback.remove_inbox_callback(bandwidth.INfile)
     callback.remove_finish_file_sending_callback(bandwidth.OUTfile)
     d = gateway.stop()
     bandwidth.shutdown()
     gateway.shutdown()
     return d
Example #2
0
def shutdown():
    """
    To stop program correctly - need to call this before shut down.
    """
    lg.out(4, "io_throttle.shutdown")
    callback.remove_finish_file_sending_callback(FileSendingFinished)
    callback.remove_queue_item_status_callback(OutboxStatus)
    throttle().DeleteBackupRequests('')
    throttle().DeleteBackupSendings('')
    throttle().DeleteSuppliers(list(throttle().supplierQueues.keys()))
    def stop(self):
        from transport import gateway
        from transport import callback
        from transport import bandwidth

        callback.remove_inbox_callback(bandwidth.INfile)
        callback.remove_finish_file_sending_callback(bandwidth.OUTfile)
        d = gateway.stop()
        bandwidth.shutdown()
        gateway.shutdown()
        return d
Example #4
0
 def doDestroyMe(self, arg):
     """
     Remove all references to the state machine object to destroy it.
     """
     # gateway.remove_transport_state_changed_callback(self._on_transport_state_changed)
     network_connector.A().removeStateChangedCallback(self._on_network_connector_state_changed)
     callback.remove_inbox_callback(self._on_inbox_packet_received)
     callback.remove_finish_file_sending_callback(self._on_finish_file_sending)
     automat.objects().pop(self.index)
     global _ProxyRouter
     del _ProxyRouter
     _ProxyRouter = None
Example #5
0
 def doDestroyMe(self, arg):
     """
     Remove all references to the state machine object to destroy it.
     """
     # gateway.remove_transport_state_changed_callback(self._on_transport_state_changed)
     if network_connector.A():
         network_connector.A().removeStateChangedCallback(
             self._on_network_connector_state_changed)
     callback.remove_inbox_callback(self._on_inbox_packet_received)
     callback.remove_finish_file_sending_callback(
         self._on_finish_file_sending)
     self.unregister()
     global _ProxyRouter
     del _ProxyRouter
     _ProxyRouter = None
Example #6
0
 def doStopFilterOutgoingTraffic(self, *args, **kwargs):
     """
     Action method.
     """
     callback.remove_finish_file_sending_callback(
         self._on_first_outbox_packet)
Example #7
0
 def doStopFilterOutgoingTraffic(self, arg):
     """
     Action method.
     """
     callback.remove_finish_file_sending_callback(self._on_outbox_packet)