| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function handle(Consumer $consumer): void |
||
| 21 | { |
||
| 22 | if ($this->pidManager->pidExists()) { |
||
| 23 | $this->warn("Table sync worker already running (PID: {$this->pidManager->readPid()})"); |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | $this->pidManager->writePid(); |
||
| 28 | $this->listenTerminateSignals($consumer); |
||
| 29 | |||
| 30 | $consumer->consume(); |
||
| 31 | } |
||
| 50 |