Example #1
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 shutdown():
    """
    Called from top level code when the software is finishing.
    """
    global _ShutdownFlag
    global _ContactsStatusDict
    lg.out(4, 'contact_status.shutdown')
    callback.remove_inbox_callback(Inbox)
    callback.remove_outbox_callback(Outbox)
    callback.remove_queue_item_status_callback(OutboxStatus)
    for A in _ContactsStatusDict.values():
        A.destroy()
    _ContactsStatusDict.clear()
    _ShutdownFlag = True
Example #3
0
def shutdown():
    """
    Called from top level code when the software is finishing.
    """
    global _OfflineCheckTask
    global _ShutdownFlag
    global _OnlineStatusDict
    lg.out(4, 'online_status.shutdown')
    _OfflineCheckTask.stop()
    del _OfflineCheckTask
    _OfflineCheckTask = None
    callback.remove_inbox_callback(Inbox)
    callback.remove_queue_item_status_callback(OutboxStatus)
    for o_status in list(_OnlineStatusDict.values()):
        o_status.automat('shutdown')
    _OnlineStatusDict.clear()
    _ShutdownFlag = True
Example #4
0
 def doDestroyMe(self, *args, **kwargs):
     """
     Remove all references to the state machine object to destroy it.
     """
     global _PacketLogFileEnabled
     global _ProxyReceiver
     _PacketLogFileEnabled = False
     callback.remove_queue_item_status_callback(self._on_queue_item_status_changed)
     self.possible_router_idurl = None
     self.router_idurl = None
     self.router_id = ''
     self.router_identity = None
     self.router_proto_host = None
     self.request_service_packet_id = []
     self.latest_packet_received = 0
     self.router_connection_info = None
     self.traffic_in = 0
     self.destroy()
     del _ProxyReceiver
     _ProxyReceiver = None