Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

サーバ起動時にアンテナが非アクティブだった場合、アクティブ化しても再起動するまで反映されない #12391

Merged

Conversation

samunohito
Copy link
Member

@samunohito samunohito commented Nov 20, 2023

What

#12303 の対応です。
この対応により、アンテナの再アクティブ化がすぐに反映されて再びユーザのアンテナTLに配信されるようになります。

deactivateAntennaThreshold(デフォだと一週間)以上再起動していないサーバではこの現象が起こりやすくなります。

Why

サーバが再起動するまで再アクティブ化されたアンテナの状態が反映されないのは不便

Additional info (optional)

以下手順で確認

  1. 対象アンテナのisActiveをfalseに変更しサーバを再起動
  2. キーワードを含むノートを投稿してアンテナが稼働しないことを確認
  3. アンテナTLをリロード
  4. 対象アンテナのisActiveがtrueに変わっていること、キーワードを含むノートを投稿したらアンテナTLに配信されることを確認

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Nov 20, 2023
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b5be0e5) 78.77% compared to head (52827fe) 78.63%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12391      +/-   ##
===========================================
- Coverage    78.77%   78.63%   -0.15%     
===========================================
  Files          947      176     -771     
  Lines       102729    23334   -79395     
  Branches      8274      495    -7779     
===========================================
- Hits         80929    18349   -62580     
+ Misses       21800     4985   -16815     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 20, 2023

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

});
if (!antenna.isActive) {
antenna.isActive = true;
antenna.lastUsedAt = new Date();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isActiveだった場合lastUsedAtが更新されないけど大丈夫そうかしら

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大丈夫じゃないですね…
修正しました:pray:

95b5534

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

読み込みのたびにlastUsedAtが更新されるのも無駄感あるからそのうちなんとかしたいわね

@syuilo syuilo merged commit b3d1cc9 into misskey-dev:develop Nov 21, 2023
17 of 18 checks passed
@syuilo
Copy link
Member

syuilo commented Nov 21, 2023

🙏

anatawa12 pushed a commit to anatawa12/misskey that referenced this pull request Nov 26, 2023
* サーバ起動時にアンテナが非アクティブだった場合、アクティブ化しても再起動するまで反映されない

* Fix CHANGELOG.md

* lastUsedAtの更新に不備が出るので修正

---------

Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
@samunohito samunohito deleted the fix/12303_cant_activate_antenna branch January 11, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants