Open
Conversation
config.jsonの変更を再起動なしで自動反映する機能と、 配信者状態をdata/state.jsonに永続化して再起動時の 重複通知を防止する機能を追加。
- StreamerStateにJSONタグを直接追加しpersistedStateと変換関数を削除 - MkdirAllをRun初期化時に移動し毎ポーリングのsyscallを排除 - checkConfigReloadのmap構築を1パスに統合 - processStreamerにdirty flagを導入し無変更時の状態保存をスキップ - 全ファイルのコメント末尾の句点を除去
- DetectChangesで両方IsLiveの場合のみtitle/game変更を検出するよう修正 - ensureDirがMkdirAll失敗時にdone扱いにしないよう修正 - time.FixedZoneをpackage-level変数に変更し毎回の生成を排除 - formatElapsedTime/formatDurationの共通ロジックを抽出 - 未使用のSendToMultipleWebhooksを削除 - findStreamerをfindStreamerIndexベースに統合
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
Test plan
go vet ./...でコンパイルエラーがないことを確認go build ./cmd/stream-notifier/でビルド成功を確認data/state.jsonが保存・復元されることを確認config.jsonを編集し、リロードログが出ることを確認