@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | // Add backup cron job. |
| 20 | 20 | $config['jobs'][] = BackupCronJob::class; |
| 21 | 21 | |
| 22 | - $callback = function (Process $process) use ($swoole, $config, $laravelConfig) { |
|
| 23 | - $pidfile = dirname($swoole->setting['pid_file']) . '/' . $this->timerPidFile; |
|
| 22 | + $callback = function(Process $process) use ($swoole, $config, $laravelConfig) { |
|
| 23 | + $pidfile = dirname($swoole->setting['pid_file']).'/'.$this->timerPidFile; |
|
| 24 | 24 | file_put_contents($pidfile, $process->pid); |
| 25 | 25 | $this->setProcessTitle(sprintf('%s laravels: timer process', $config['process_prefix'])); |
| 26 | 26 | $this->initLaravel($laravelConfig, $swoole); |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | if (empty($job->interval())) { |
| 43 | 43 | throw new \InvalidArgumentException(sprintf('The interval of %s cannot be empty', get_class($job))); |
| 44 | 44 | } |
| 45 | - $runJob = function () use ($job) { |
|
| 46 | - $runCallback = function () use ($job) { |
|
| 47 | - $this->callWithCatchException(function () use ($job) { |
|
| 45 | + $runJob = function() use ($job) { |
|
| 46 | + $runCallback = function() use ($job) { |
|
| 47 | + $this->callWithCatchException(function() use ($job) { |
|
| 48 | 48 | $job->run(); |
| 49 | 49 | }); |
| 50 | 50 | }; |
@@ -59,13 +59,13 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - Process::signal(SIGUSR1, function ($signo) use ($config, $timerIds, $process) { |
|
| 62 | + Process::signal(SIGUSR1, function($signo) use ($config, $timerIds, $process) { |
|
| 63 | 63 | foreach ($timerIds as $timerId) { |
| 64 | 64 | if (Timer::exists($timerId)) { |
| 65 | 65 | Timer::clear($timerId); |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | - Timer::after($config['max_wait_time'] * 1000, function () use ($process) { |
|
| 68 | + Timer::after($config['max_wait_time'] * 1000, function() use ($process) { |
|
| 69 | 69 | $process->exit(0); |
| 70 | 70 | }); |
| 71 | 71 | }); |