feat: one-command supervisor for bot, updater, and jobs - #7
Closed
kinton wants to merge 1 commit into
Closed
Conversation
kinton
marked this pull request as ready for review
September 3, 2026 09:28
python main.py still starts everything. A crashed updater or jobs process is restarted without taking receive down. Deploy stays supervisorctl restart yourcast. Co-authored-by: Kovalenko K. <kintonkk@gmail.com>
cursor
Bot
force-pushed
the
cursor/process-supervisor-d56e
branch
from
September 3, 2026 15:39
761f76e to
766d65b
Compare
7 tasks
Contributor
Author
|
Superseded by #12: Telethon sessions are per-role, updater cursor is sqlite, start_new_session is off, supervisor.conf has stopasgroup/killasgroup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
python main.pyis still the only start command. That process is now a supervisor: it runsbot,updater, andjobsas children and restarts a crashed role without taking the others down.Deploy is unchanged:
supervisorctl restart yourcastin.github/workflows/main.yml.Why
A dead backup/Patreon/updater thread used to call
supervisorctl restart yourcastand bounce receive with it.Behavior
Shelve access is flock’d so bot and updater can share FSM/cursor. A dead send-thread in the bot process signals only that process; the parent restarts
bot, not the whole tree.python main.py --role bot|updater|jobsis debug-only.Tests
python app/core/test_process_supervisor.py— dummy children, no Telegram: crashed role restarts, sibling pid unchanged, stop kills children, inter-process lock.