Skip to content

Commit

Permalink
reload all by inotify
Browse files Browse the repository at this point in the history
  • Loading branch information
hhxsv5 committed May 10, 2019
1 parent 4cb3093 commit 6164818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Swoole/Traits/InotifyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public function addInotifyProcess(Server $swoole, array $config, array $laravelC
return;
}

$autoReload = function () use ($swoole, $config, $laravelConf) {
$autoReload = function () use ($config, $laravelConf) {
$log = !empty($config['log']);
$this->setProcessTitle(sprintf('%s laravels: inotify process', $config['process_prefix']));
$inotify = new Inotify($config['watch_path'], IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE,
function ($event) use ($swoole, $log, $laravelConf) {
function ($event) use ($log, $laravelConf) {
// $swoole->reload();
$reloadCmd = trim(sprintf('%s -c "%s" %s/bin/laravels reload', PHP_BINARY, php_ini_loaded_file(), $laravelConf['root_path']));
Portal::runCommand($reloadCmd);
Expand Down

0 comments on commit 6164818

Please sign in to comment.