[MEDIUM] 시스템 종료 시 텔레그램 shutdown 알림 미발송 #214

Closed
opened 2026-02-23 10:04:07 +09:00 by agentson · 0 comments
Collaborator

문제

TelegramClient.notify_system_shutdown()이 구현되어 있으나, src/main.pyrun() 함수 finally 블록에서 호출되지 않는다.

# main.py:2298-2304
finally:
    await command_handler.stop_polling()
    await broker.close()
    await telegram.close()   # notify_system_shutdown() 호출 없음
    db_conn.close()

수정 방법

finally:
    try:
        await telegram.notify_system_shutdown()
    except Exception:
        pass
    await command_handler.stop_polling()
    await broker.close()
    await telegram.close()
    db_conn.close()
## 문제 `TelegramClient.notify_system_shutdown()`이 구현되어 있으나, `src/main.py`의 `run()` 함수 `finally` 블록에서 호출되지 않는다. ```python # main.py:2298-2304 finally: await command_handler.stop_polling() await broker.close() await telegram.close() # notify_system_shutdown() 호출 없음 db_conn.close() ``` ## 수정 방법 ```python finally: try: await telegram.notify_system_shutdown() except Exception: pass await command_handler.stop_polling() await broker.close() await telegram.close() db_conn.close() ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#214