Skip to content

fix(notice): add upsert and start goroutine to load notice db#426

Open
SchwarzSail wants to merge 3 commits into
west2-online:mainfrom
SchwarzSail:notice_init_job
Open

fix(notice): add upsert and start goroutine to load notice db#426
SchwarzSail wants to merge 3 commits into
west2-online:mainfrom
SchwarzSail:notice_init_job

Conversation

@SchwarzSail
Copy link
Copy Markdown
Member

@SchwarzSail SchwarzSail commented Mar 12, 2026

自查 PR 结构

  • PR 标题符合这个格式: <type>(optional scope): <description>

  • 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。

  • 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

  • 这个 PR 属于强制变更/破坏性更改

如果是,请在 PR 标题中添加 BREAKING CHANGE 前缀,并在 PR 描述中详细说明。

这个 PR 的类型是什么?

这个 PR 做了什么 / 我们为什么需要这个 PR?

  • 修改create Notice操作为 upsert 操作,意在唯一索引命中时做更新操作而不是输出Error日志
  • 将主线程的 loadNotice 操作修改为开启 goroutine 的异步操作,而syncNoticeTask需要确保数据库中有数据后才能做diff操作

(可选)这个 PR 解决了哪个/些 issue?

对 Reviewer 预留的一些提醒

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/db/notice/create_notice.go 0.00% 18 Missing ⚠️
@@            Coverage Diff             @@
##             main     #426      +/-   ##
==========================================
- Coverage   62.30%   62.08%   -0.23%     
==========================================
  Files         216      216              
  Lines        5492     5507      +15     
==========================================
- Hits         3422     3419       -3     
- Misses       1963     1982      +19     
+ Partials      107      106       -1     
Flag Coverage Δ
unittest 62.08% <0.00%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/db/notice/create_notice.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchwarzSail SchwarzSail requested review from a team, jiuxia211, mutezebra and ozline as code owners March 12, 2026 04:47
@jiuxia211
Copy link
Copy Markdown
Contributor

ci没过的样子

Comment thread cmd/common/main.go Outdated
@renbaoshuo renbaoshuo requested a review from ozline March 17, 2026 03:38
@renbaoshuo
Copy link
Copy Markdown
Member

这个 PR 是不是该推一推了?看起来是需要在 #402, #431 之前合进去的

@renbaoshuo renbaoshuo changed the title fix:add upsert and start goroutine to load notice db fix(notice): add upsert and start goroutine to load notice db Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants