Used to register signal at the dispatcher. Note that you can not use alias that already exists.

        :param alias: Alias of the signal. String.
        :param signal: Signal itself. Usually pyqtSignal instance.
        :return:
509883
def register_signal(alias: str, signal: pyqtSignal):
        
        if SignalDispatcher.signal_alias_exists(alias):
            raise SignalDispatcherError('Alias "' + alias + '" for signal already exists!')

        SignalDispatcher.signals[alias] = signal
268321
def signals(self, signals=('QUIT', 'USR1', 'USR2')):
        ''''''
        for sig in signals:
            signal.signal(getattr(signal, 'SIG' + sig), self.handler)
229537
def register_alias(self, alias, key):
        
        alias = alias.lower()
        key = key.lower()
        if alias != key and alias != self._real_key(key):
            exists = self._aliases.get(alias)

            if exists is None:
                # if we alias something that exists in one of the dicts to
                # another name, we'll never be able to get that value using the
                # original name, so move the config value to the new _real_key.
                val = self._config.get(alias)
                if val:
                    self._config.pop(alias)
                    self._config[key] = val
                val = self._kvstore.get(alias)
                if val:
                    self._kvstore.pop(alias)
                    self._kvstore[key] = val
                val = self._defaults.get(alias)
                if val:
                    self._defaults.pop(alias)
                    self._defaults[key] = val
                val = self._override.get(alias)
                if val:
                    self._override.pop(alias)
                    self._override[key] = val

                self._aliases[alias] = key
        else:
            log.warning("Creating circular reference alias {0} {1} {2}".format(
                alias, key, self._real_key(key)))
1085026
def register_signal_handlers
      trap('TERM') { shutdown! }
      trap('INT')  { shutdown! }

      begin
        trap('QUIT') { shutdown }
      rescue ArgumentError
        warn "Signals TERM and/or QUIT not supported."
      end

      log! "Registered signals"
    end
202502
def proxy(self, signal_source, *signal_names, weak_ref=False):
		
		callback = self.__callback if weak_ref is False else self.__weak_ref_callback
		for signal_name in signal_names:
			signal_source.callback(signal_name, callback)
171744
def signal_handler(self, *args):
        
        self.user_callback(self.signal, self.user_arg, *args)
1362180
def register(self, switch, signal=signals.switch_registered):
        '''
        
        '''
        if not switch.name:
            raise ValueError('Switch name cannot be blank')

        switch.manager = self
        self.__persist(switch)

        signal.call(switch)
438053
def _connect_signals(self, model):
        
        for signal in self._signals:
            receiver = self._signals[signal]
            signal.connect(receiver, sender=model, dispatch_uid=self._dispatch_uid(signal, model))
883308
def register():
    ''''''
    for sig_name in _SIGNAL_HANDLERS_DB.keys():
        if not hasattr(signals, sig_name):
            _LOGGER.error((
                'The i18n_subsites plugin requires the {} '
                'signal available for sure in Pelican 3.4.0 and later, '
                'plugin will not be used.').format(sig_name))
            return

    for sig_name, handler in _SIGNAL_HANDLERS_DB.items():
        sig = getattr(signals, sig_name)
        sig.connect(handler)
388801
def configure_alias(graph, ns, mappings):
    
    convention = AliasConvention(graph)
    convention.configure(ns, mappings)
247459
def _register_signal_handler(self, description, signal, handler):
        
        from flask import signals

        if not signals.signals_available:
            self.app.logger.warn('blinker needs to be installed in order to support %s'.format(description))
        self.app.logger.info('Enabling {}'.format(description))
        # Weak references won't work if handlers are methods rather than functions.
        signal.connect(handler, sender=self.app, weak=False)
904456
def signal(sig)
      sig = sig.to_i if sig.to_i != 0
      applog(self, :info, "#{self.name} sending signal '#{sig}' to pid #{self.pid}")
      ::Process.kill(sig, self.pid) rescue nil
    end
1235989
def enable_signals(self):
        '''
        
        '''
        signal_dict = self.settings[self.signal_key] or {}
        for i in signal_dict.keys():
            sig_module, signal_class = self.import_class_from_path(i)
            for j in signal_dict[i]:
                recv_module, recv_coro = self.import_class_from_path(j)
                signal_class.register(recv_coro)
1080340
def register(self, alias, uri):
        
        # TODO: do we want to constrain the valid alias names.
        if isinstance(uri, dict):
            id = uri.get('id', alias)
            self.resolver.store[id] = uri
            uri = id
        self.aliases[alias] = uri
246300
def register(actor, prefix)
      raise ArgumentError, "#{actor.inspect} is not a RightScale::Actor subclass instance" unless RightScale::Actor === actor
      log_msg = "[actor] #{actor.class.to_s}"
      log_msg += ", prefix #{prefix}" if prefix && !prefix.empty?
      Log.info(log_msg)
      prefix ||= actor.class.default_prefix
      @actors[prefix.to_s] = actor
    end
737151
def setup_signal_handlers(self):
        
        LOGGER.debug('Registering signal handlers')
        signal.signal(signal.SIGABRT, self.on_sigabrt)
134645
def delete_alias(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.delete_alias(index=self._name, **kwargs)