'Adds an executor to this scheduler. Any extra keyword arguments will be passed to the executor plugin\'s
constructor, assuming that the first argument is the name of an executor plugin.
:param str|unicode|apscheduler.executors.base.BaseExecutor executor: either an executor instance or the name of
an executor plugin
:param str|unicode alias: alias for the scheduler
:raises ValueError: if there is already an executor by the given alias'

def add_executor(self, executor, alias='default', **executor_opts):

    with self._executors_lock:
        if (alias in self._executors):
            raise ValueError(('This    scheduler    already    has    an    executor    by    the    alias    of    "%s"' % alias))
        if isinstance(executor, BaseExecutor):
            self._executors[alias] = executor
        elif isinstance(executor, six.string_types):
            self._executors[alias] = executor = self._create_plugin_instance('executor', executor, executor_opts)
        else:
            raise TypeError(('Expected    an    executor    instance    or    a    string,    got    %s    instead' % executor.__class__.__name__))
        if self.running:
            executor.start(self)
    self._dispatch_event(SchedulerEvent(EVENT_EXECUTOR_ADDED, alias))
