| Total Complexity | 5 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Coverage | 93.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Kernel extends ConsoleKernel |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The Artisan commands provided by your application. |
||
| 12 | * |
||
| 13 | * @var array |
||
|
|
|||
| 14 | */ |
||
| 15 | protected $commands = [ |
||
| 16 | // |
||
| 17 | ]; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Define the application's command schedule. |
||
| 21 | * |
||
| 22 | * @param \Illuminate\Console\Scheduling\Schedule $schedule |
||
|
2 ignored issues
–
show
|
|||
| 23 | * @return void |
||
| 24 | */ |
||
| 25 | 82 | protected function schedule(Schedule $schedule) |
|
| 26 | { |
||
| 27 | // $schedule->command('inspire') |
||
| 28 | // ->hourly(); |
||
| 29 | |||
| 30 | // start the queue daemon, if its not running |
||
| 31 | 82 | if (!$this->osProcessIsRunning('queue:work')) { |
|
| 32 | 82 | $schedule->command('queue:work')->everyMinute(); |
|
| 33 | } |
||
| 34 | 82 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Register the commands for the application. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | 82 | protected function commands() |
|
| 46 | 82 | } |
|
| 47 | |||
| 48 | /** |
||
| 49 | * checks, if a process with $needle in the name is running |
||
| 50 | * |
||
| 51 | * @param string $needle |
||
|
1 ignored issue
–
show
|
|||
| 52 | * @return bool |
||
|
1 ignored issue
–
show
|
|||
| 53 | */ |
||
| 54 | 82 | protected function osProcessIsRunning($needle) |
|
| 74 |