refactor: handle message (#19)

This commit is contained in:
banteg
2026-01-02 01:55:46 +04:00
committed by GitHub
parent ac844b5305
commit 73ba4836c1
4 changed files with 208 additions and 148 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ The orchestrator module containing:
|-----------|---------|
| `BridgeConfig` | Frozen dataclass holding runtime config |
| `poll_updates()` | Async generator that drains backlog, long-polls updates, filters messages |
| `_run_main_loop()` | TaskGroup-based main loop that spawns per-message handlers |
| `run_main_loop()` | TaskGroup-based main loop that spawns per-message handlers |
| `handle_message()` | Per-message handler with progress updates and final render |
| `ProgressEdits` | Throttled progress edit worker |
| `_handle_cancel()` | `/cancel` routing |
@@ -162,7 +162,7 @@ Telegram Update
poll_updates() drains backlog, long-polls, filters chat_id == from_id == cfg.chat_id
_run_main_loop() spawns tasks in TaskGroup
run_main_loop() spawns tasks in TaskGroup
handle_message() spawned as task