Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
37 | { |
||
38 | $store = new SemaphoreStore(); |
||
39 | $factory = new LockFactory($store); |
||
40 | |||
41 | $lock = $factory->createLock($this->getName()); |
||
|
|||
42 | |||
43 | if ($lock->acquire()) { |
||
44 | $this->scoringTeamRankingHandler->handle(); |
||
45 | $lock->release(); |
||
46 | } else { |
||
47 | echo self::$defaultName . " IS LOCKED\n"; |
||
48 | } |
||
49 | return Command::SUCCESS; |
||
50 | } |
||
52 |