src/Console/ImportCommand.php
public function handle()
    {
        $this->parseArguments();

        $imported = 0;

        $files = $this->getJobFiles($this->path);

        if (($totalFiles = count($files)) > 1) {
            if (! $this->confirmToProceed("You are about to import $totalFiles jobs.")) {
                return;
            }
        }

        foreach ($files as $filename) {
            try {
                $this->importJob($filename, $this->argument('tube'), $this->option('delay'), $this->option('ttr'), $this->option('priority'));
                $imported++;
            } catch (\RuntimeException $e) {
                $this->reportImported($imported);

                throw $e;
            }
        }

        $this->reportImported($imported);
    }
public function handle()
    {
        $this->parseArguments();

        $imported = 0;

        $files = $this->getJobFiles($this->path);

        if (($totalFiles = count($files)) > 1) {
            if (! $this->confirmToProceed("You are about to import $totalFiles jobs.")) {
                return;
            }
        }

        foreach ($files as $filename) {
            try {
                $this->importJob($filename, $this->argument('tube'), $this->option('delay'), $this->option('ttr'), $this->option('priority'));
                $imported++;
            } catch (\RuntimeException $e) {
                $this->reportImported($imported);

                throw $e;
            }
        }

        $this->reportImported($imported);
    }
public function handle ( ) { $ this -> parseArguments ( ) ; $ imported = 0 ; $ files = $ this -> getJobFiles ( $ this -> path ) ; if ( ( $ totalFiles = count ( $ files ) ) > 1 ) { if ( ! $ this -> confirmToProceed ( "You are about to import $totalFiles jobs." ) ) { return ; } } foreach ( $ files as $ filename ) { try { $ this -> importJob ( $ filename , $ this -> argument ( 'tube' ) , $ this -> option ( 'delay' ) , $ this -> option ( 'ttr' ) , $ this -> option ( 'priority' ) ) ; $ imported ++ ; } catch ( \ RuntimeException $ e ) { $ this -> reportImported ( $ imported ) ; throw $ e ; } } $ this -> reportImported ( $ imported ) ; }
{@inheritdoc}
{