def spawn_worker(self, entrypoint, args, kwargs,
                     context_data=None, handle_result=None):

        if self._being_killed:
            _log.info("Worker spawn prevented due to being killed")
            raise ContainerBeingKilled()

        service = self.service_cls()
        worker_ctx = self.worker_ctx_cls(
            self, service, entrypoint, args, kwargs, data=context_data)

        _log.debug('spawning %s', worker_ctx)
        gt = self._worker_pool.spawn(self._run_worker, worker_ctx,
                                     handle_result)
        self._active_threads[gt] = entrypoint
        gt.link(self._handle_thread_exited)
        return worker_ctx
User AppCommands can execute when a single app name is provided
dataset/ETHPy150Open onefinestay/nameko/nameko/containers.py/ServiceContainer.spawn_worker--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/admin_scripts/tests.py/CommandTypes.test_app_command_invalid_appname