Skip to content

feat: Discord bot pending entry 加入 TTL 或改用 Redis #21

Description

@chienchuanw

描述

Discord bot 的待確認記帳項目目前存放於 in-memory map,無 TTL 清除機制。建議加入自動過期或遷移至 Redis。

#13 的關聯

#13 描述此問題為 bug;本 issue 追蹤完整的解決方案實作。

建議方向

  • 方案 A:加入 goroutine 定期清除超過 15 分鐘的 pending entry
  • 方案 B:使用 Redis 儲存 pending entry,設定 TTL
  • 方案 B 更適合未來多實例部署

相關檔案

  • backend/internal/discord/handler.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions