def stop(self): from access import key_ring from transport import callback callback.remove_inbox_callback(self._inbox_packet_received) callback.remove_outbox_callback(self._outbox_packet_sent) key_ring.shutdown() return True
def stop(self): from supplier import customer_assistant from transport import callback callback.remove_outbox_callback(self._outbox_packet_sent) for sc in customer_assistant.assistants().values(): sc.automat('shutdown') return True
def stop(self): from twisted.internet import reactor # @UnresolvedImport from main import events from supplier import customer_assistant from transport import callback callback.remove_inbox_callback(self._on_inbox_packet_received) callback.remove_outbox_callback(self._on_outbox_packet_sent) events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') for ca in customer_assistant.assistants().values(): reactor.callLater(0, ca.automat, 'shutdown') # @UndefinedVariable return True
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