Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement restart ordering #2632

Merged
merged 6 commits into from Dec 18, 2022
Merged

Implement restart ordering #2632

merged 6 commits into from Dec 18, 2022

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Dec 18, 2022

Replaces #2623
Closes #2619

Current logic terminates a process (sends SIGINT), then starts a new process.

This PR makes the following changes/additions:

  • Adds functionality to reverse the order so that a worker must ack before terminating the old process
  • Moves the ack to after before_server_start

@codecov
Copy link

codecov bot commented Dec 18, 2022

Codecov Report

Base: 88.555% // Head: 88.571% // Increases project coverage by +0.015% 🎉

Coverage data is based on head (bd9fc5d) compared to base (518152d).
Patch coverage: 98.780% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2632       +/-   ##
=============================================
+ Coverage   88.555%   88.571%   +0.015%     
=============================================
  Files           81        82        +1     
  Lines         6702      6746       +44     
  Branches      1143      1152        +9     
=============================================
+ Hits          5935      5975       +40     
- Misses         528       530        +2     
- Partials       239       241        +2     
Impacted Files Coverage Δ
sanic/mixins/signals.py 96.551% <ø> (ø)
sanic/worker/process.py 90.909% <97.222%> (+2.020%) ⬆️
sanic/app.py 89.836% <100.000%> (+0.018%) ⬆️
sanic/constants.py 100.000% <100.000%> (ø)
sanic/mixins/startup.py 91.196% <100.000%> (ø)
sanic/server/runners.py 89.156% <100.000%> (+0.132%) ⬆️
sanic/worker/constants.py 100.000% <100.000%> (ø)
sanic/worker/inspector.py 94.047% <100.000%> (+0.145%) ⬆️
sanic/worker/manager.py 91.071% <100.000%> (+0.565%) ⬆️
sanic/worker/multiplexer.py 100.000% <100.000%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ahopkins ahopkins marked this pull request as ready for review December 18, 2022 10:20
@ahopkins ahopkins requested a review from a team as a code owner December 18, 2022 10:20
@ahopkins ahopkins merged commit f7040cc into main Dec 18, 2022
@ahopkins ahopkins deleted the restart-order branch December 18, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restart workers online (graceful restart) to hot reload, in production environment.
1 participant