• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IlyasDeckers / ody-core / 13532154862

25 Feb 2025 10:24PM UTC coverage: 30.374% (+1.7%) from 28.706%
13532154862

push

github

web-flow
Update php.yml

544 of 1791 relevant lines covered (30.37%)

9.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Console/Commands/Server/ReloadCommand.php
1
<?php
2

3
namespace Ody\Core\Console\Commands\Server;
4

5
use Swoole\Process;
6
use Symfony\Component\Console\Attribute\AsCommand;
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Ody\Core\Console\Style;
11

12
#[AsCommand(
13
    name: 'server:reload' ,
×
14
    description: 'reload http server'
×
15
)]
×
16
class ReloadCommand extends Command
17
{
18
    protected function execute(InputInterface $input, OutputInterface $output): int
×
19
    {
20
        $io = new Style($input, $output);
×
21

22
        if (! httpServerIsRunning()){
×
23
            $io->error('server is not running...' , true);
×
24
            return self::FAILURE;
×
25
        }
26

27
        if (httpServerIsRunning()) {
×
28
            posix_kill(getManagerProcessId(), SIGUSR1);
×
29
            posix_kill(getMasterProcessId(), SIGUSR1);
×
30

31
            foreach (getWorkerProcessIds() as $processId) {
×
32
                posix_kill($processId , SIGUSR1);
×
33
            }
34
        }
35

36
        $io->success('reloading workers...' , true);
×
37
        return self::SUCCESS;
×
38
    }
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc