<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Command; use Illuminate\Console\Command; use Illuminate\Support\Facades\Log; use Illuminate\Support\Str; use ModStart\Core\Util\ArrayUtil; use ModStart\Core\Util\FileUtil; use ModStart\Core\Util\ShellUtil; use ModStart\Core\Util\TimeUtil; use ModStart\ModStart; use Module\Vendor\Util\CacheUtil; class ScheduleRunAllCommand extends Command { protected $signature = 'modstart:schedule-run-all {php} {dir}'; public function handle() { goto X8YR1; seaj9: $c2rbB = md5($hVc4x . ':' . $B13iK); goto mXzcE; wWRFh: $B13iK = $this->argument('dir'); goto seaj9; X8YR1: $hVc4x = $this->argument('php'); goto wWRFh; Yl780: foreach ($nP75r as $WU3lH) { goto oYdP_; UvL8H: $AzbSd = str_replace('No scheduled commands are ready to run.', '〇', $AzbSd); goto GK833; oYdP_: $kHkis = TimeUtil::millitime(); goto acrro; rt6Qp: $AzbSd = str_replace('
', ' ', $AzbSd); goto qYGOg; bszzf: $AzbSd = str_replace(array('
'), '', $AzbSd); goto rt6Qp; acrro: $ZsyG0 = "{$hVc4x} {$WU3lH['pathname']}/artisan schedule:run"; goto a17vb; s4Flq: $AzbSd = ShellUtil::run($ZsyG0, false); goto bszzf; o9GAB: Log::info("Vendor.ScheduleRunAllCommand.Result - {$AzbSd} - {$a0h9J}ms"); goto b2kTw; GK833: $a0h9J = TimeUtil::millitime() - $kHkis; goto o9GAB; qYGOg: $AzbSd = str_replace('Running scheduled command: Closure', '√', $AzbSd); goto UvL8H; a17vb: Log::info("Vendor.ScheduleRunAllCommand.Run - {$ZsyG0}"); goto s4Flq; b2kTw: } goto ti_em; mXzcE: $nP75r = CacheUtil::remember('Vendor:ScheduleRunAll:Projects:' . $c2rbB, 3600, function () use($B13iK) { $nP75r = FileUtil::listFiles($B13iK); $nP75r = array_filter($nP75r, function ($WCikz) { return $WCikz['isDir'] && @file_exists($WCikz['pathname'] . '/artisan') && @file_exists($WCikz['pathname'] . '/.env') && !Str::startsWith($WCikz['filename'], '_delete.') && @file_exists($WCikz['pathname'] . '/vendor/modstart/modstart-' . ModStart::env()); }); shuffle($nP75r); return ArrayUtil::keepItemsKeys($nP75r, array('pathname')); }); goto Yl780; ti_em: } }