misskey
misskey copied to clipboard
fix(backend): ジョブキュー再試行時のタイミングずれによるエラーを抑制
What
Resolve #11034 ジョブがすでに再試行の状態にあると分かったときは無視して続行するようにする。
Why
#11034
Checklist
- [x] Read the contribution guide
- [x] Test working in a local environment
- [ ] (If needed) Add story of storybook
- [ ] (If needed) Update CHANGELOG.md
- [ ] (If possible) Add tests
Codecov Report
Merging #11035 (cf1e8ff) into develop (1b1f82a) will increase coverage by
0.00%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## develop #11035 +/- ##
===========================================
Coverage 77.34% 77.34%
===========================================
Files 739 907 +168
Lines 70532 91418 +20886
Branches 7103 7540 +437
===========================================
+ Hits 54550 70710 +16160
- Misses 15982 20708 +4726
Impacted Files | Coverage Δ | |
---|---|---|
...nd/src/server/api/endpoints/admin/queue/promote.ts | 41.66% <0.00%> (-16.03%) |
:arrow_down: |
@CodiumAI-Agent please review
Preparing review...
PR Analysis
- 🎯 Main theme: Suppressing error due to timing mismatch during job queue retry
- 🔍 Description and title: Yes
- 📌 Type of PR: Bug fix
- 🧪 Relevant tests added: No
- ✨ Minimal and focused: Yes, the PR is focused on handling a specific error during job queue retry
PR Feedback
-
💡 General PR suggestions: The PR is well structured and the changes are focused on the issue at hand. However, it would be beneficial to add tests to ensure the changes work as expected and prevent future regressions.
-
🤖 Code suggestions:
-
suggestion 1:
- relevant file: promote.ts
- suggestion content: The error handling code is duplicated for 'deliver' and 'inbox' cases. Consider refactoring this into a separate function to avoid code duplication. [important]
-
suggestion 2:
- relevant file: promote.ts
- suggestion content: The error message 'not in a delayed state' is used directly in the code. Consider defining it as a constant to avoid potential issues with typos or changes in the error message. [medium]
-
🔒 Security concerns: No, the changes made in this PR do not introduce any obvious security concerns.
Add a comment that says 'Please review' to ask for a new review after you update the PR. Add a comment that says 'Please answer <QUESTION...>' to ask a question about this PR.
🙏🏻