コード例 #1
0
ファイル: service_gateway.py プロジェクト: hack-bitdust/devel
 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
コード例 #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()))
コード例 #3
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
コード例 #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
コード例 #5
0
ファイル: proxy_router.py プロジェクト: hack-bitdust/devel
 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
コード例 #6
0
ファイル: proxy_sender.py プロジェクト: StasEvseev/devel
 def doStopFilterOutgoingTraffic(self, *args, **kwargs):
     """
     Action method.
     """
     callback.remove_finish_file_sending_callback(
         self._on_first_outbox_packet)
コード例 #7
0
 def doStopFilterOutgoingTraffic(self, arg):
     """
     Action method.
     """
     callback.remove_finish_file_sending_callback(self._on_outbox_packet)