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

IlyasDeckers / ody-core / 13575371463

27 Feb 2025 08:34PM UTC coverage: 28.921% (+0.6%) from 28.348%
13575371463

push

github

IlyasDeckers
Refactoring/cleaning up/getting rid of redundant helper functions

0 of 68 new or added lines in 8 files covered. (0.0%)

9 existing lines in 5 files now uncovered.

544 of 1881 relevant lines covered (28.92%)

8.7 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 Ody\Swoole\ServerState;
6
use Swoole\Process;
7
use Symfony\Component\Console\Attribute\AsCommand;
8
use Symfony\Component\Console\Command\Command;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
use Ody\Core\Console\Style;
12

13
#[AsCommand(
14
    name: 'server:reload' ,
×
15
    description: 'reload http server'
×
16
)]
×
17
class ReloadCommand extends Command
18
{
19
    /**
20
     * @param InputInterface $input
21
     * @param OutputInterface $output
22
     * @return int
23
     */
UNCOV
24
    protected function execute(InputInterface $input, OutputInterface $output): int
×
25
    {
NEW
26
        $serverState = ServerState::getInstance();
×
UNCOV
27
        $io = new Style($input, $output);
×
28

NEW
29
        if (!$serverState->httpServerIsRunning()){
×
30
            $io->error('server is not running...' , true);
×
31
            return self::FAILURE;
×
32
        }
33

NEW
34
        posix_kill($serverState->getManagerProcessId(), SIGUSR1);
×
NEW
35
        posix_kill($serverState->getMasterProcessId(), SIGUSR1);
×
36

NEW
37
        foreach ($serverState->getWorkerProcessIds() as $processId) {
×
NEW
38
            posix_kill($processId , SIGUSR1);
×
39
        }
40

41
        $io->success('reloading workers...' , true);
×
42
        return self::SUCCESS;
×
43
    }
44
}
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