Showing
1 changed file
with
10 additions
and
5 deletions
... | @@ -9,6 +9,7 @@ use Carbon\Carbon; | ... | @@ -9,6 +9,7 @@ use Carbon\Carbon; |
9 | use Illuminate\Bus\Queueable; | 9 | use Illuminate\Bus\Queueable; |
10 | use Illuminate\Contracts\Queue\ShouldBeUnique; | 10 | use Illuminate\Contracts\Queue\ShouldBeUnique; |
11 | use Illuminate\Contracts\Queue\ShouldQueue; | 11 | use Illuminate\Contracts\Queue\ShouldQueue; |
12 | +use Illuminate\Contracts\Support\Arrayable; | ||
12 | use Illuminate\Foundation\Bus\Dispatchable; | 13 | use Illuminate\Foundation\Bus\Dispatchable; |
13 | use Illuminate\Queue\InteractsWithQueue; | 14 | use Illuminate\Queue\InteractsWithQueue; |
14 | use Illuminate\Queue\SerializesModels; | 15 | use Illuminate\Queue\SerializesModels; |
... | @@ -159,7 +160,11 @@ class MakeVideo implements ShouldQueue | ... | @@ -159,7 +160,11 @@ class MakeVideo implements ShouldQueue |
159 | ' -ar 44100 -ac 2 -qmin 30 -qmax 60 -profile:v baseline -preset fast ' . | 160 | ' -ar 44100 -ac 2 -qmin 30 -qmax 60 -profile:v baseline -preset fast ' . |
160 | escapeshellarg($video); | 161 | escapeshellarg($video); |
161 | 162 | ||
162 | - if (!$this->execmd($cmd)) return; | 163 | + $exec = $this->execmd($cmd); |
164 | + if (is_array($exec)){ | ||
165 | + print_r($exec,1); | ||
166 | + return; | ||
167 | + } | ||
163 | 168 | ||
164 | try{ | 169 | try{ |
165 | // 全部合成以后创建 临境 | 170 | // 全部合成以后创建 临境 |
... | @@ -408,7 +413,7 @@ class MakeVideo implements ShouldQueue | ... | @@ -408,7 +413,7 @@ class MakeVideo implements ShouldQueue |
408 | * 执行命令 | 413 | * 执行命令 |
409 | * @param $cmd | 414 | * @param $cmd |
410 | * @param bool $update_progress | 415 | * @param bool $update_progress |
411 | - * @return string | 416 | + * @return mixed |
412 | */ | 417 | */ |
413 | public function execmd($cmd, $update_progress = false) { | 418 | public function execmd($cmd, $update_progress = false) { |
414 | echo $cmd . "\n". "\n". "\n"; | 419 | echo $cmd . "\n". "\n". "\n"; |
... | @@ -452,11 +457,11 @@ class MakeVideo implements ShouldQueue | ... | @@ -452,11 +457,11 @@ class MakeVideo implements ShouldQueue |
452 | return $stdout; | 457 | return $stdout; |
453 | } else { | 458 | } else { |
454 | $error = trim($error0,"\n") . ' '. trim($error1,"\n"); | 459 | $error = trim($error0,"\n") . ' '. trim($error1,"\n"); |
455 | - // LogUtil::write(array("cmd:{$cmd}", "errno:{$exitedcode}", "stdout:{$stdout}"), __CLASS__); | 460 | + Log::channel('daily')->error(print_r(array("cmd:{$cmd}", "errno:{$exitedcode}", "stdout:{$stdout}"),1)); |
456 | - // ErrorUtil::triggerErrorMsg($error, $exitedcode); | 461 | + return [$error,$exitedcode]; |
457 | } | 462 | } |
458 | } else { | 463 | } else { |
459 | - // return ErrorUtil::triggerErrorMsg('proc_open error'); | 464 | + Log::channel('daily')->error('proc_open error'); |
460 | } | 465 | } |
461 | } | 466 | } |
462 | 467 | ... | ... |
-
Please register or login to post a comment