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

More robust shutdown process #511

Merged
merged 1 commit into from
Jun 27, 2024
Merged

More robust shutdown process #511

merged 1 commit into from
Jun 27, 2024

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Jun 26, 2024

What kind of change does this PR introduce?

Chore

What is the current behavior?

If one of the components crashes before the server is fully started, we are not gracefully shutting down other services.

What is the new behavior?

  • Shared shutdown procedure for worker and api
  • Use AbortSignals to notify shutdown
  • Always clean up successful started services

@coveralls
Copy link

coveralls commented Jun 26, 2024

Pull Request Test Coverage Report for Build 9680890030

Details

  • 21 of 102 (20.59%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 79.761%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/internal/database/migrations/migrate.ts 1 4 25.0%
src/internal/errors/codes.ts 4 9 44.44%
src/internal/pubsub/postgres.ts 2 12 16.67%
src/internal/queue/queue.ts 3 31 9.68%
src/internal/concurrency/async-abort-controller.ts 10 45 22.22%
Totals Coverage Status
Change from base Build 9676081090: -0.3%
Covered Lines: 12799
Relevant Lines: 15905

💛 - Coveralls

@fenos fenos force-pushed the shutdown/signals branch from 86a3ed9 to 797f903 Compare June 27, 2024 09:31
@coveralls
Copy link

coveralls commented Jun 27, 2024

Pull Request Test Coverage Report for Build 9694172129

Details

  • 39 of 177 (22.03%) changed or added relevant lines in 8 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 79.522%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/internal/database/migrations/migrate.ts 7 10 70.0%
src/internal/database/migrations/progressive.ts 0 3 0.0%
src/internal/errors/codes.ts 4 9 44.44%
src/internal/pubsub/postgres.ts 5 26 19.23%
src/internal/queue/queue.ts 3 54 5.56%
src/internal/concurrency/async-abort-controller.ts 18 73 24.66%
Files with Coverage Reduction New Missed Lines %
src/internal/pubsub/postgres.ts 1 45.05%
Totals Coverage Status
Change from base Build 9676081090: -0.6%
Covered Lines: 12812
Relevant Lines: 15974

💛 - Coveralls

@fenos fenos merged commit 74492da into master Jun 27, 2024
1 check passed
@fenos fenos deleted the shutdown/signals branch June 27, 2024 09:37
Copy link

🎉 This PR is included in version 1.6.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants