Skip to content

Commit

Permalink
optimize the call of schedule:run command
Browse files Browse the repository at this point in the history
  • Loading branch information
hhxsv5 committed Jun 6, 2023
1 parent 1084a4e commit 078b174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Console/Portal.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ protected function getConfigPath()

public static function runCommand($cmd, $input = null)
{
$fp = popen($cmd, 'w');
$fp = popen($cmd, 'wb');
if ($fp === false) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/LaravelScheduleJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Hhxsv5\LaravelS\Illuminate;

use Hhxsv5\LaravelS\Console\Portal;
use Hhxsv5\LaravelS\Swoole\Timer\CronJob;
use Illuminate\Contracts\Console\Kernel;

class LaravelScheduleJob extends CronJob
{
Expand All @@ -21,6 +21,6 @@ public function isImmediate()

public function run()
{
app(Kernel::class)->call('schedule:run');
Portal::runArtisanCommand(base_path(), 'schedule:run >> /dev/null 2>&1');
}
}

0 comments on commit 078b174

Please sign in to comment.