'Handles the \'execute\' CLI command.
If there is already a task queue running in this process, adds the execution to the queue.
If FlexGet is being invoked with this command, starts up a task queue and runs the execution.
Fires events:
* manager.execute.started
* manager.execute.completed
:param options: argparse options'

def execute_command(self, options):

    fire_event(u'manager.execute.started', self, options)
    if (self.task_queue.is_alive() or self.is_daemon):
        if (not self.task_queue.is_alive()):
            log.error(u'Task    queue    has    died    unexpectedly.    Restarting    it.    Please    open    an    issue    on    Github    and    include    any    previous    error    logs.')
            self.task_queue = TaskQueue()
            self.task_queue.start()
        if len(self.task_queue):
            log.verbose(u'There    is    a    task    already    running,    execution    queued.')
        finished_events = self.execute(options, output=logger.get_capture_stream(), loglevel=logger.get_capture_loglevel())
        if (not options.cron):
            for (_, _, event) in finished_events:
                event.wait()
    else:
        self.task_queue.start()
        self.ipc_server.start()
        self.execute(options)
        self.shutdown(finish_queue=True)
        self.task_queue.wait()
    fire_event(u'manager.execute.completed', self, options)
