起動時に未取得メッセージをバックフィルする機能を追加#133
Merged
Merged
Conversation
- 前回停止からのギャップが5分以上の場合のみ、過去24時間以内に活動があったチャンネルを対象に conversations.history API で差分を取得する - app_heartbeat テーブルを SQLite に追加し、起動時・1分ごとにハートビートを記録してギャップを判定する - バックフィルは RTM 起動をブロックしないようバックグラウンドで実行し、1分ごとに進捗・時間帯を標準出力に表示する - 通常の再起動(5分未満)では API 呼び出しゼロ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
バックフィル中の個々のメッセージ表示を抑制し、SQLite/TSV へのログ書き込みのみ行う。 進捗・完了メッセージは引き続き標準出力に表示する。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
conversations.historyAPI で自動取得するapp_heartbeatテーブルを SQLite に追加し、ギャップが5分以上の場合のみバックフィルを実行(通常の再起動では API 呼び出しゼロ)動作の流れ
Test plan
Backfilling messages for N channel(s) in background...が表示され、完了後にBackfill complete: N message(s) fetched.が表示されることcreated_atとlogged_atにギャップがある行で確認)🤖 Generated with Claude Code