def shutdown(self): self.result_defer = None self.received_lf_counter = 0 self.last_time_saw_files.clear() self.requested_lf_packet_ids.clear() events.remove_subscriber(self._on_supplier_connected, 'supplier-connected') events.remove_subscriber(self._on_my_identity_rotated, 'my-identity-rotated')
def stop(self): from main import events from coins import supplier_contract_executor events.remove_subscriber(self._on_customer_modified) for customer_idurl in list(supplier_contract_executor.all_contracts.keys()): supplier_contract_executor.shutdown_contract(customer_idurl) return True
def stop(self): from main import events from chat import message_database from chat import message_keeper events.remove_subscriber(self._on_my_keys_synchronized, 'my-keys-synchronized') message_keeper.shutdown() message_database.shutdown() return True
def stop(self): from main import events from access import groups events.remove_subscriber(self._on_dht_layer_connected, event_id='dht-layer-connected') events.remove_subscriber(self._on_supplier_modified, 'supplier-modified') groups.shutdown() return True
def stop(self): from customer import fire_hire from main.config import conf from main import events events.remove_subscriber(self._on_supplier_modified) conf().removeCallback('services/customer/suppliers-number') conf().removeCallback('services/customer/needed-space') fire_hire.Destroy() return True
def stop(self): from main import events from stream import io_throttle from stream import data_sender from stream import data_receiver events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') data_receiver.A('shutdown') data_sender.SetShutdownFlag() data_sender.A('shutdown') io_throttle.shutdown() return True
def stop(self): from twisted.internet.defer import succeed from main import events from main.config import conf events.remove_subscriber(self._on_dht_layer_connected, event_id='dht-layer-connected') conf().removeConfigNotifier('services/proxy-transport/enabled') conf().removeConfigNotifier('services/proxy-transport/sending-enabled') conf().removeConfigNotifier('services/proxy-transport/receiving-enabled') t = self.transport self.transport = None t.automat('shutdown') return succeed(True)
def stop(self): from main import events from p2p import network_connector events.remove_subscriber(self._on_my_external_ip_changed, 'my-external-ip-changed') events.remove_subscriber(self._on_my_identity_rotate_complete, 'my-identity-rotate-complete') network_connector.Destroy() if self.task and self.task.running: self.task.stop() self.task = None return True
def stop(self): from dht import dht_service from dht import dht_records from main import events from stream import message_peddler events.remove_subscriber(self._on_my_identity_url_changed, 'my-identity-url-changed') events.remove_subscriber(self._on_dht_layer_connected, 'dht-layer-connected') dht_service.suspend(layer_id=dht_records.LAYER_MESSAGE_BROKERS) message_peddler.A('stop') 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 stop(self): from services import driver from main import events from transport.proxy import proxy_router events.remove_subscriber(self._on_dht_layer_connected, 'dht-layer-connected') proxy_router.A('stop') proxy_router.A('shutdown') if driver.is_on('service_entangled_dht'): from dht import dht_service from dht import dht_records dht_service.suspend(layer_id=dht_records.LAYER_PROXY_ROUTERS) return True
def stop(self): from main.config import conf from main import events from customer import fire_hire fire_hire.A().removeStateChangedCallback(self._on_fire_hire_ready) events.remove_subscriber(self._on_dht_layer_connected, event_id='dht-layer-connected') events.remove_subscriber(self._on_supplier_modified, 'supplier-modified') conf().removeConfigNotifier('services/customer/suppliers-number') conf().removeConfigNotifier('services/customer/needed-space') fire_hire.Destroy() return True
def stop(self): from twisted.internet import reactor # @UnresolvedImport from customer import supplier_connector from userid import my_id from main import events events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') events.remove_subscriber(self._on_my_keys_synchronized, 'my-keys-synchronized') for sc in supplier_connector.connectors(my_id.getLocalID()).values(): reactor.callLater(0, sc.automat, 'shutdown') # @UndefinedVariable # TODO: disconnect other suppliers return True
def shutdown(): global _WebSocketListener events.remove_subscriber(on_event, event_id='*') if _WebSocketListener: if _Debug: lg.out(_DebugLevel, 'api_web_socket.shutdown calling _WebSocketListener.stopListening()') _WebSocketListener.stopListening() del _WebSocketListener _WebSocketListener = None if _Debug: lg.out(_DebugLevel, ' _WebSocketListener destroyed') else: lg.warn('_WebSocketListener is None')
def stop(self): from main.config import conf from main import events from p2p import propagate from contacts import contactsdb from contacts import identitycache events.remove_subscriber(self._on_my_identity_rotated, 'my-identity-rotated') events.remove_subscriber(self._on_local_identity_modified, 'local-identity-modified') conf().removeConfigNotifier( 'services/identity-propagate/known-servers') propagate.shutdown() contactsdb.shutdown() identitycache.shutdown() return True
def stop(self): from storage import backup_fs from storage import backup_monitor from storage import backup_control from transport import callback from p2p import p2p_connector from main import events from main.config import conf events.remove_subscriber(self._on_key_erased, 'key-erased') events.remove_subscriber(self._on_my_identity_rotated, 'my-identity-rotated') callback.remove_inbox_callback(self._on_inbox_packet_received) if p2p_connector.A(): p2p_connector.A().removeStateChangedCallback(self._on_p2p_connector_state_changed) backup_monitor.Destroy() backup_fs.shutdown() backup_control.shutdown() conf().removeConfigNotifier('services/backups/keep-local-copies-enabled') return True
def stop_publisher(self, event_id): if event_id not in self.publishers: raise Exception('event publisher not found') result = events.remove_subscriber(self.publishers[event_id], event_id) if not self.publishers.pop(event_id, None): lg.warn('publisher event %s for producer %s was not cleaned correctly' % (event_id, self.producer_id)) if not result: lg.warn('event subscriber for %s was not removed' % event_id) return result
def stop(self): from transport import callback from main import events # from contacts import contactsdb # for customer_idurl in contactsdb.customers(): # events.send('existing-customer-terminated', data=dict(idurl=customer_idurl)) events.remove_subscriber(self._on_customer_accepted, 'existing-customer-accepted') events.remove_subscriber(self._on_customer_accepted, 'new-customer-accepted') events.remove_subscriber(self._on_customer_terminated, 'existing-customer-denied') events.remove_subscriber(self._on_customer_terminated, 'existing-customer-terminated') callback.remove_inbox_callback(self._on_inbox_packet_received) return True
def stop(self): from main import events self.refresh_task.stop() events.remove_subscriber(self._on_new_customer_accepted) events.remove_subscriber(self._on_existing_customer_accepted) events.remove_subscriber(self._on_existing_customer_terminated) return True
def stop(self): from transport import callback from main import events from p2p import online_status from p2p import p2p_service from p2p import p2p_connector from p2p import network_connector from p2p import ratings events.remove_subscriber(self._on_my_identity_url_changed, 'my-identity-url-changed') events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') callback.remove_inbox_callback(self._on_inbox_packet_received) callback.remove_inbox_callback(p2p_service.inbox) if network_connector.A(): network_connector.A().removeStateChangedCallback( self._on_network_connector_switched) p2p_connector.A().removeStateChangedCallback( self._on_p2p_connector_switched) ratings.shutdown() online_status.shutdown() p2p_connector.Destroy() p2p_service.shutdown() return True
def stop(self): from main import events from transport import callback events.remove_subscriber(self._on_key_erased, 'key-erased') events.remove_subscriber(self._on_my_list_files_refreshed, 'my-list-files-refreshed') events.remove_subscriber(self._on_supplier_modified, 'supplier-modified') callback.remove_inbox_callback(self._on_inbox_packet_received) return True
def stop(self): from twisted.internet import reactor # @UnresolvedImport from main import events from supplier import family_member events.remove_subscriber(self._on_new_customer_accepted, 'new-customer-accepted') events.remove_subscriber(self._on_existing_customer_accepted, 'existing-customer-accepted') events.remove_subscriber(self._on_existing_customer_terminated, 'existing-customer-terminated') events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') for fm in family_member.families().values(): reactor.callLater(0, fm.automat, 'shutdown') # @UndefinedVariable return True
def stop(self): from main import events from supplier import family_member events.remove_subscriber(self._on_new_customer_accepted) events.remove_subscriber(self._on_existing_customer_accepted) events.remove_subscriber(self._on_existing_customer_terminated) for fm in family_member.families().values(): fm.automat('shutdown') return True
def stop(self): from chat import message_database from chat import message_keeper from main import events events.remove_subscriber(self.on_key_generated, 'key-generated') events.remove_subscriber(self.on_key_renamed, 'key-renamed') events.remove_subscriber(self.on_key_registered, 'key-registered') message_keeper.shutdown() message_database.shutdown() return True
def stop(self): from main import events from access import groups from access import group_member events.remove_subscriber(groups.on_identity_url_changed, 'identity-url-changed') group_member.shutdown_group_members() events.remove_subscriber(self._on_dht_layer_connected, 'dht-layer-connected') events.remove_subscriber(self._on_supplier_modified, 'supplier-modified') groups.shutdown() return True
def stop(self): from main import events from transport import callback from stream import message from chat import nickname_holder events.remove_subscriber(self._on_user_connected, 'node-connected') events.remove_subscriber(self._on_user_disconnected, 'node-disconnected') events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') callback.remove_inbox_callback(self._on_inbox_packet_received) nickname_holder.Destroy() message.shutdown() return True
def shutdown(self): from main import events events.remove_subscriber(self._on_my_suppliers_yet_not_hired, 'my-suppliers-yet-not-hired') events.remove_subscriber(self._on_my_suppliers_all_hired, 'my-suppliers-all-hired')
def shutdown(self): events.remove_subscriber(self._on_supplier_connected, 'supplier-connected') events.remove_subscriber(self._on_my_identity_rotated, 'my-identity-rotated')
def stop(self): from main import events from storage import index_synchronizer from storage import keys_synchronizer if index_synchronizer.A(): index_synchronizer.A().removeStateChangedCallback( self._on_index_synchronizer_state_changed) events.remove_subscriber(self._on_my_keys_synchronize_failed, 'my-keys-synchronize-failed') events.remove_subscriber(self._on_my_backup_index_out_of_sync, 'my-backup-index-out-of-sync') events.remove_subscriber(self._on_my_backup_index_synchronized, 'my-backup-index-synchronized') events.remove_subscriber(self._on_key_erased, 'key-erased') events.remove_subscriber(self._on_key_registered, 'key-registered') events.remove_subscriber(self._on_key_generated, 'key-generated') events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') if keys_synchronizer.A(): keys_synchronizer.A('shutdown') return True
def stop(self): from main import events from transport import callback events.remove_subscriber(self._on_supplier_modified) callback.remove_inbox_callback(self._on_inbox_packet_received) return True