@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | return false; |
17 | 17 | } |
18 | 18 | |
19 | - $callback = function (Process $process) use ($swoole, $config, $laravelConfig) { |
|
20 | - $pidfile = dirname($swoole->setting['pid_file']) . '/' . $this->timerPidFile; |
|
19 | + $callback = function(Process $process) use ($swoole, $config, $laravelConfig) { |
|
20 | + $pidfile = dirname($swoole->setting['pid_file']).'/'.$this->timerPidFile; |
|
21 | 21 | file_put_contents($pidfile, $process->pid); |
22 | 22 | $this->setProcessTitle(sprintf('%s laravels: timer process', $config['process_prefix'])); |
23 | 23 | $this->initLaravel($laravelConfig, $swoole); |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | if (empty($job->interval())) { |
40 | 40 | throw new \InvalidArgumentException(sprintf('The interval of %s cannot be empty', get_class($job))); |
41 | 41 | } |
42 | - $runJob = function () use ($job) { |
|
43 | - $runCallback = function () use ($job) { |
|
44 | - $this->callWithCatchException(function () use ($job) { |
|
42 | + $runJob = function() use ($job) { |
|
43 | + $runCallback = function() use ($job) { |
|
44 | + $this->callWithCatchException(function() use ($job) { |
|
45 | 45 | $job->run(); |
46 | 46 | }); |
47 | 47 | }; |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | - Process::signal(SIGUSR1, function ($signo) use ($config, $timerIds, $process) { |
|
59 | + Process::signal(SIGUSR1, function($signo) use ($config, $timerIds, $process) { |
|
60 | 60 | foreach ($timerIds as $timerId) { |
61 | 61 | if (Timer::exists($timerId)) { |
62 | 62 | Timer::clear($timerId); |
63 | 63 | } |
64 | 64 | } |
65 | - Timer::after($config['max_wait_time'] * 1000, function () use ($process) { |
|
65 | + Timer::after($config['max_wait_time'] * 1000, function() use ($process) { |
|
66 | 66 | $process->exit(0); |
67 | 67 | }); |
68 | 68 | }); |