Execute the command.
500343
async def _execute(self, api_command):
        """"""
        if api_command.observe:
            await self._observe(api_command)
            return

        method = api_command.method
        path = api_command.path
        data = api_command.data
        parse_json = api_command.parse_json
        url = api_command.url(self._host)

        kwargs = {}

        if data is not None:
            kwargs['payload'] = json.dumps(data).encode('utf-8')
            _LOGGER.debug('Executing %s %s %s: %s', self._host, method, path,
                          data)
        else:
            _LOGGER.debug('Executing %s %s %s', self._host, method, path)

        api_method = Code.GET
        if method == 'put':
            api_method = Code.PUT
        elif method == 'post':
            api_method = Code.POST
        elif method == 'delete':
            api_method = Code.DELETE
        elif method == 'fetch':
            api_method = Code.FETCH
        elif method == 'patch':
            api_method = Code.PATCH

        msg = Message(code=api_method, uri=url, **kwargs)

        _, res = await self._get_response(msg)

        api_command.result = _process_output(res, parse_json)

        return api_command.result
123367
public function handle()
    {
        if ($this->checkIfCanIncrement('current')) {
            $number = app('pragmarx.version')->incrementMinor();

            $this->info("New minor version: {$number}");

            $this->displayAppVersion();
        }
    }
360404
public function handle()
    {
        $id = $this->argument('id');
        $rule = $this->argument('rule');

        if( $id && $rule ) {
            $this->generateThumbByRule($id, $rule);
        } else {
            if( $id ) {
                $this->generateGlobalThumb($id);
            } else {

                if( $this->confirm('Are you sure you want to generate thumbs for all resources?') ) {
                    $list = HCResources::all()->pluck('id');

                    foreach ( $list as $id )
                        $this->generateGlobalThumb($id);
                }
            }
        }
    }
1108663
public function handle()
    {
        $format = $this->option('format') ?: 'full';

        $appName = $this->option('suppress-app-name')
            ? ''
            : config('app.name').' ';

        $this->info($appName.app('pragmarx.version')->format($format));
    }
660085
public function handle()
    {

        $this->folderName = $this->formatModelPath($this->argument('ModelName'));


        $path = base_path('resources/views/'. $this->folderName);

        if ( $this->removeViewFiles($path) ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('No Such Directory');


    }
1363653
public function handle()
    {
        if ($name = $this->argument('module')) {
            $module = $this->laravel['modules']->findOrFail($name);

            $this->publish($module);

            return;
        }

        foreach ($this->laravel['modules']->allEnabled() as $module) {
            $this->publish($module);
        }
    }
610196
public function handle()
    {

        $this->folderName = $this->formatModelPath($this->argument('ModelName'));

        $this->modelName = $this->formatModel($this->argument('ModelName'));

        $this->setCommandType($this->argument('command'));

        $this->setViewPaths();


        $path = base_path('resources/views/'. $this->folderName);

        if ( $this->removeViewFolder($path) && $this->deleteFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('No Such Directory');


    }
930399
def execute(self, command):
        '''
        
        '''
        process = Popen(command, stdout=PIPE, stderr=STDOUT, universal_newlines=True)
        while True:
            if process.poll() is not None:
                self.returncode = process.returncode  # pylint: disable=W0201
                break
            yield process.stdout.readline()
245499
public function handle()
    {
        $this->install();

        $command = trim($this->option('command'));
        if (empty($command) === true) {
            $command = 'help';
        }

        $input = new StringInput($command);
        $output = $this->getOutput();
        $application = new \Composer\Console\Application();
        $application->setAutoExit(false);
        $application->run($input, $output);
    }
961328
public function handle()
    {
        $this->repository->setSource($this->determineConnection());

        $this->repository->createRepository();

        $this->info('CMS migration table created successfully.');
    }
608946
public function handle()
    {
        $this->info('Starting Custom Witness command...');

        foreach ($this->eye->getCustomWitnesses(true) as $witness) {
            $this->info('Running: '.$witness->getSafeName());

            $status = $this->runWitness($witness);
            $witness->saveHistory($status);
            $witness->checkHealth($status);
        }

        $this->info('Custom Witness command complete...');
    }
744084
public function handle()
    {
        // Set locale to use
        $locale = $this->argument('locale');

        // Set CSV options
        $delimiter = $this->option('delimiter');
        $enclosure = $this->option('enclosure');

        // Get path for the CSV.
        $this->export_path = $this->option('path') ?: $this->export_path;

        // Create storage dir
        if (file_exists($this->export_path) == false) {
            mkdir($this->export_path, 0755, true);
        }

        // Process all of the locales
        foreach ($this->getGroupArgument() as $group) {
            $this->createExport($locale, $group, $delimiter, $enclosure);
        }
    }
435026
public function handle()
    {
        if ($this->checkIfCanIncrement('current')) {
            $number = app('pragmarx.version')->incrementMajor();

            $this->info("New major version: {$number}");

            $this->displayAppVersion();
        }
    }
696729
public function handle()
    {
        $theme = strtolower($this->argument('name'));

        $this->installTheme($theme);
        $this->setupTheme($theme);

        if ($this->option('default')) {
            $this->setAsDefaultTheme($theme);
        }

        $this->info('Theme ['.$theme.'] installed.');
    }
582584
public function handle()
    {
        // This code will be executed after pulling this class from the queue and deserialization
        //
        // pass the message to the Message Bus
        //
        switch ($this->message->messageType()) {
            case Message::TYPE_COMMAND:
                CommandBus::dispatch($this->message);
                break;
            case Message::TYPE_QUERY:
                QueryBus::dispatch($this->message);
                break;
            case Message::TYPE_EVENT:
                EventBus::dispatch($this->message);
                break;
        }
    }
608587
public function handle()
    {

        $this->modelName = $this->formatModel($this->argument('ModelName'));

        $this->modelPath = $this->formatModelPath($this->argument('ModelName'));

        $this->setCommandType($this->argument('command'));

        $this->setCrudPaths();

        if ( $this->deleteFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('Oops, something went wrong!');


    }
1266990
public function handle()
    {
        $git_url = $this->argument('$git_url');
        $warning = 'This will overrite you Auth view files. Do you wish to continue? [y|N]';
        if ($this->confirm($warning)) {
            $this->info('Getting auth theme from github');
            $process = new Process('git clone '. $git_url . ' tmp_auth && rm -rf tmp_auth/.git && rm -f tmp_auth/readme.md && cp -rf tmp_auth/* resources/views/ && rm -rf tmp_auth');
            $process->run();

            // executes after the command finishes
            if (!$process->isSuccessful()) {
                throw new ProcessFailedException($process);
            }

            echo $process->getOutput();
            $this->info('Successfully added auth theme');
        } else {
            $this->info('Alright, we wount touch anything!');
        }
    }