mirror of
https://github.com/fosrl/newt.git
synced 2026-05-06 07:59:04 -05:00
[PR #300] refactor: Newt runtime lifecycle to context-driven worker supervision. #1041
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/newt/pull/300
Author: @LaurenceJJones
Created: 4/7/2026
Status: 🔄 Open
Base:
dev← Head:refactor/context-errgroup📝 Commits (2)
f43e11fRefactor Newt runtime lifecycle to context-driven worker supervision.b7b7a90fix: dont throw away timers reuse them for gc📊 Changes
4 files changed (+190 additions, -123 deletions)
View changed files
📝
authdaemon.go(+8 -12)📝
common.go(+26 -30)📝
main.go(+97 -65)📝
websocket/client.go(+59 -16)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Replace stop-channel orchestration with scoped context cancellation for tunnel and interval workers, add errgroup-based supervision for long-running services, and simplify shutdown to fail fast so Docker/systemd handles restarts.
also will help #24 as we dont return after interval we keep going to max interval ceiling, we should maybe also add flags or env that if we reach max interval to just kill process as we dont know if we need a new state to revive.
How to test?
Pure internal refactor.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.