Conversation
| end | ||
|
|
||
| puts "Imported #{entries.size} items." | ||
| puts "Imported #{new_count + updated_count} items (#{new_count} new, #{updated_count} updated)." |
Contributor
There was a problem hiding this comment.
提案なので更新はお任せしますが、fetch_news.rake と同様に logger で出力する方法に揃えてあげても良さそうです📝
(出力の内容は良さそうです🙆♀️)
Contributor
Author
There was a problem hiding this comment.
ありがとうございます!🙌
確かに logger 出力に揃えた方がスッキリすると思うので、fetch_news.rake と同様の logger 設定に変更します✨
rakuda-san-desu
approved these changes
Aug 5, 2025
Contributor
rakuda-san-desu
left a comment
There was a problem hiding this comment.
タスク実行時の更新状況も、よりわかりやすくなりました🙆♀️
1件コメントしていますが、このままでも問題ないと思うのでApproveしています。
対応ありがとうございます🙏✨
Contributor
Author
|
@rakuda-san-desu 何度もすみません🙏 |
rakuda-san-desu
approved these changes
Aug 5, 2025
Contributor
rakuda-san-desu
left a comment
There was a problem hiding this comment.
対応ありがとうございます!
ログの出力も確認しました🙆♀️
1件コメントしましたが、それ以外は良さそうです。
対応後、マージしていただければ🙏✨
| new_count += 1 if is_new | ||
| updated_count += 1 unless is_new | ||
|
|
||
| logger.info "[News] #{news.published_at.to_date} #{news.title} (#{status})" # ← puts から logger.info に変更 |
Contributor
There was a problem hiding this comment.
この部分のコメントは不要そうです✂️
それ以外は良さそうです!
対応ありがとうございます👍
Contributor
Author
|
修正対応全て完了し、テストもパスしたのでマージします🚀 |
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.
Fixes. #1716
cf. #1704 (cf. #1577 )
lib/tasks/fetch_news.rake解決すべき問題
fetch_news.rake→ 差分がある場合のみ更新するように修正↪︎
titleまたはpublished_atに差分がある場合だけupdated_itemsに追加import_news.rake→ 更新があった場合のみsave!↪︎
news.changed?で変更があるか判定。新規 or 変更時だけ保存(既存データはそのまま)。
(ログに新規/更新のステータスも出力)