Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

feat(server): handle signals to enable graceful termination #459

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

k911
Copy link
Owner

@k911 k911 commented Feb 2, 2021

No description provided.

@k911 k911 self-assigned this Feb 2, 2021
@k911 k911 force-pushed the feat/signal-handling branch 8 times, most recently from 4cc5995 to 08ea403 Compare February 2, 2021 22:52
src/Process/ProcessManager.php Show resolved Hide resolved
src/Process/ProcessFactory.php Show resolved Hide resolved
src/Process/ProcessFactory.php Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 2, 2021

Codecov Report

Merging #459 (3b91333) into develop (da33c81) will decrease coverage by 2.83%.
The diff coverage is 57.27%.

❗ Current head 3b91333 differs from pull request most recent head 26e0c21. Consider uploading reports for the commit 26e0c21 to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #459      +/-   ##
=============================================
- Coverage      86.03%   83.20%   -2.84%     
- Complexity       654      723      +69     
=============================================
  Files             96      109      +13     
  Lines           2070     2257     +187     
=============================================
+ Hits            1781     1878      +97     
- Misses           289      379      +90     
Impacted Files Coverage Δ Complexity Δ
...dge/Symfony/Bundle/Command/ServerReloadCommand.php 84.21% <0.00%> (ø) 4.00 <0.00> (ø)
...idge/Symfony/Bundle/Command/ServerStartCommand.php 93.33% <ø> (+3.67%) 5.00 <0.00> (-5.00) ⬆️
...ridge/Symfony/Bundle/Command/ServerStopCommand.php 84.21% <0.00%> (ø) 4.00 <0.00> (ø)
...entListener/SwooleErrorOnConsoleTerminateEvent.php 0.00% <0.00%> (ø) 2.00 <2.00> (?)
src/Process/ProcessFactory.php 0.00% <0.00%> (ø) 1.00 <1.00> (?)
src/Process/Signal/PcntlSignalHandler.php 0.00% <0.00%> (ø) 9.00 <9.00> (?)
src/Server/Configurator/WithProcess.php 0.00% <0.00%> (ø) 2.00 <2.00> (?)
src/Server/HttpServer.php 85.71% <0.00%> (-2.53%) 34.00 <1.00> (+1.00) ⬇️
...own/SignalServerShutdownHandlerAsServerProcess.php 0.00% <0.00%> (ø) 5.00 <5.00> (?)
src/Server/WorkerHandler/NoOpWorkerExitHandler.php 0.00% <0.00%> (ø) 1.00 <1.00> (?)
... and 31 more

@k911 k911 force-pushed the feat/signal-handling branch 6 times, most recently from d09b4a8 to e738805 Compare April 17, 2021 11:58

final class SwooleErrorOnConsoleTerminateEvent
{
public function onConsoleTerminate(ConsoleTerminateEvent $event): void
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the unused function parameter "$event".


final class SwooleErrorOnConsoleTerminateEvent
{
public function onConsoleTerminate(ConsoleTerminateEvent $event): void
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid unused parameters such as '$event'.

@k911 k911 force-pushed the feat/signal-handling branch from b3d4eef to b3a7bd4 Compare May 10, 2021 19:03
@k911 k911 force-pushed the feat/signal-handling branch from b3a7bd4 to d7e84ed Compare May 10, 2021 20:04
@k911 k911 force-pushed the feat/signal-handling branch from d7e84ed to 3b91333 Compare May 10, 2021 20:10
@k911 k911 force-pushed the feat/signal-handling branch 4 times, most recently from 483be61 to f26faa6 Compare May 11, 2021 22:11
@k911 k911 force-pushed the feat/signal-handling branch from f26faa6 to 26e0c21 Compare May 11, 2021 22:21
@codeclimate
Copy link

codeclimate bot commented May 11, 2021

Code Climate has analyzed commit 26e0c21 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 1
Bug Risk 1
Clarity 3

The test coverage on the diff in this pull request is 56.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 81.3% (-4.7% change).

View more on Code Climate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant