@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | public function run() |
| 32 | 32 | { |
| 33 | 33 | $this->registerSignalHandlers(); |
| 34 | - while(true) { |
|
| 34 | + while (true) { |
|
| 35 | 35 | if ($this->shutdown) { |
| 36 | 36 | break; |
| 37 | 37 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | try { |
| 52 | 52 | $this->delayQueue->validateClassName($data['className']); |
| 53 | - } catch(Exception $exception) { |
|
| 53 | + } catch (Exception $exception) { |
|
| 54 | 54 | $this->logger->emergency($exception->getMessage()); |
| 55 | 55 | continue; |
| 56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | protected function perform(array $data) |
| 63 | 63 | { |
| 64 | 64 | $pid = pcntl_fork(); |
| 65 | - if ($pid< 0) { |
|
| 65 | + if ($pid<0) { |
|
| 66 | 66 | $this->logger->emergency('Unable to fork child worker', ['job' => $data]); |
| 67 | 67 | return; |
| 68 | 68 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | protected function registerSignalHandlers() |
| 94 | 94 | { |
| 95 | 95 | pcntl_signal(SIGTERM, [$this, 'shutdown']); |
| 96 | - pcntl_signal(SIGINT , [$this, 'shutdown']); |
|
| 96 | + pcntl_signal(SIGINT, [$this, 'shutdown']); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | { |
| 118 | 118 | $response = $this->getHttpClient()->post('/delete', [ |
| 119 | 119 | 'json' => [ |
| 120 | - 'id' => $id |
|
| 120 | + 'id' => $id |
|
| 121 | 121 | ] |
| 122 | 122 | ]); |
| 123 | 123 | $body = $response->json(); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ] |
| 83 | 83 | ]); |
| 84 | 84 | |
| 85 | - $data = $response->json(); |
|
| 85 | + $data = $response->json(); |
|
| 86 | 86 | $this->checkResponseBody($data); |
| 87 | 87 | if (!isset($data['data']) || empty($data['data'])) { |
| 88 | 88 | return null; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | 'id' => $id |
| 121 | 121 | ] |
| 122 | 122 | ]); |
| 123 | - $body = $response->json(); |
|
| 123 | + $body = $response->json(); |
|
| 124 | 124 | $this->checkResponseBody($body); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | $job->setDelay(1 * Time::MINUTE); |
| 13 | 13 | $job->setTtr(20 * Time::SECOND); |
| 14 | 14 | $job->setBody([ |
| 15 | - 'uid' => 10829378, |
|
| 16 | - 'created' => 1498657365, |
|
| 15 | + 'uid' => 10829378, |
|
| 16 | + 'created' => 1498657365, |
|
| 17 | 17 | ]); |
| 18 | 18 | |
| 19 | 19 | |