@@ -20,7 +20,7 @@ |
||
20 | 20 | if (extension_loaded('pcntl')) { |
21 | 21 | function catchSignals() { exit; } |
22 | 22 | |
23 | - pcntl_signal(SIGINT, 'catchSignals'); |
|
23 | + pcntl_signal(SIGINT, 'catchSignals'); |
|
24 | 24 | pcntl_signal(SIGTERM, 'catchSignals'); |
25 | 25 | } |
26 | 26 |
@@ -39,11 +39,9 @@ |
||
39 | 39 | Log::info('Initing listener...'); |
40 | 40 | |
41 | 41 | new Source\Core\Listener(RABBITMQ_QUEUE, RABBITMQ_EXCHANGER); |
42 | - } |
|
43 | - catch (\Throwable $exception) { |
|
42 | + } catch (\Throwable $exception) { |
|
44 | 43 | Log::exception($exception); |
45 | - } |
|
46 | - finally { |
|
44 | + } finally { |
|
47 | 45 | sleep(5); |
48 | 46 | } |
49 | 47 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $endMicrotime = round((microtime(true) - $startMicrotime), 2); |
14 | 14 | |
15 | 15 | $usedMemory = round(memory_get_usage(false) / 1024); |
16 | - $allocedMemory = round(memory_get_usage(true) / 1024); |
|
16 | + $allocedMemory = round(memory_get_usage(true) / 1024); |
|
17 | 17 | |
18 | 18 | \Source\Infra\Logger\Log::debug("[*] Used memory: {$usedMemory}KB, Alocated memory: {$allocedMemory}KB"); |
19 | 19 | \Source\Infra\Logger\Log::debug("[*] Execution time: {$endMicrotime}, Exiting..."); |