From a27892146f60b22240fb8c21993f4afd13571f26 Mon Sep 17 00:00:00 2001 From: JavaPythonAIForBAT Date: Thu, 16 Jul 2026 18:03:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=20CLA=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E7=9A=84=E7=AB=8B=E5=8D=B3=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80=E8=B5=B0=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 大社区场景下立即触发 500 封限制无实际价值,定时器中午/午夜各扫一轮即可。 SetPendingCLAForLink 保留,持久化通知标记,定时器扫到后自动发送。 --- signing/app/cla.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/signing/app/cla.go b/signing/app/cla.go index 1e41b4a..edaa1f7 100644 --- a/signing/app/cla.go +++ b/signing/app/cla.go @@ -7,7 +7,6 @@ import ( "github.com/opensourceways/app-cla-server/signing/domain/claservice" "github.com/opensourceways/app-cla-server/signing/domain/dp" "github.com/opensourceways/app-cla-server/signing/domain/repository" - "github.com/opensourceways/app-cla-server/signing/watch" ) func NewCLAService( @@ -66,8 +65,6 @@ func (s *claService) Update(cmd *CmdToUpdateCLA) error { logs.Error("set pending CLA for link failed: %s, err: %v", cmd.LinkId, err) } - watch.TriggerNotify() - return nil } From 56ee1821715a50fec4c6346922e7123c02d9824a Mon Sep 17 00:00:00 2001 From: JavaPythonAIForBAT Date: Thu, 16 Jul 2026 18:07:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=20TriggerNotify?= =?UTF-8?q?=20=E7=AB=8B=E5=8D=B3=E9=80=9A=E7=9F=A5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=B8=85=E7=90=86=E5=85=A8=E9=83=A8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 TriggerNotify() 函数 - 删除 corpTrigger/individualTrigger 通道字段及初始化 - 删除 watcher goroutine 中的 trigger select case - 通知统一走定时器(12:00 + 0:00),不再保留即时触发通道 --- signing/watch/notify_corp_admin.go | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/signing/watch/notify_corp_admin.go b/signing/watch/notify_corp_admin.go index 419bf51..74ea45b 100644 --- a/signing/watch/notify_corp_admin.go +++ b/signing/watch/notify_corp_admin.go @@ -26,8 +26,6 @@ func NotifyAdminWatchStart(cfg *NotifyAdminConfig, lk repoLink, corp corpSigning claPlatformURL: claPlatformURL, defaultGracePeriodDays: defaultGracePeriodDays, stop: make(chan struct{}), - corpTrigger: make(chan struct{}, 1), - individualTrigger: make(chan struct{}, 1), } notifyAdminWatchInstance.start() @@ -41,22 +39,6 @@ func NotifyAdminWatchStop() { } } -// TriggerNotify 立即触发一次通知扫描,不等待定时器周期。 -// CLA 更新后应调用此函数,确保企业和个人都在最短时间内收到通知。 -func TriggerNotify() { - if notifyAdminWatchInstance == nil { - return - } - select { - case notifyAdminWatchInstance.corpTrigger <- struct{}{}: - default: - } - select { - case notifyAdminWatchInstance.individualTrigger <- struct{}{}: - default: - } -} - type corpSigningRepo interface { FindAll(linkId string) ([]repository.CorpSigningSummary, error) UpdateCLANotify(summary *repository.CorpSigningSummary) error @@ -77,10 +59,8 @@ type notifyAdminWatchImpl struct { defaultGracePeriodDays int - wg sync.WaitGroup - stop chan struct{} - corpTrigger chan struct{} - individualTrigger chan struct{} + wg sync.WaitGroup + stop chan struct{} } func (impl *notifyAdminWatchImpl) start() { @@ -109,9 +89,6 @@ func (impl *notifyAdminWatchImpl) notifyCorpAdmin() { case <-timer.C: impl.handleNotifyJob() timer.Reset(impl.nextDelay(interval)) - case <-impl.corpTrigger: - impl.handleNotifyJob() - timer.Reset(impl.nextDelay(interval)) } } } @@ -272,9 +249,6 @@ func (impl *notifyAdminWatchImpl) notifyIndividualSigner() { case <-timer.C: impl.handleIndividualNotifyJob() timer.Reset(impl.nextDelay(interval)) - case <-impl.individualTrigger: - impl.handleIndividualNotifyJob() - timer.Reset(impl.nextDelay(interval)) } } } From 061a1e3eeea810b7c2c053e7f2176544151c76f7 Mon Sep 17 00:00:00 2001 From: JavaPythonAIForBAT Date: Thu, 16 Jul 2026 19:04:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=20URL=20=E5=90=8E=E5=A4=9A=E4=BD=99=E5=8F=A5=E5=8F=B7=E7=A7=BB?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/email-template/cla-updated.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/email-template/cla-updated.tmpl b/conf/email-template/cla-updated.tmpl index 5992c62..805224f 100644 --- a/conf/email-template/cla-updated.tmpl +++ b/conf/email-template/cla-updated.tmpl @@ -2,7 +2,7 @@ Dear {{.AdminName}}, A new version of CLA is published. Please login to the CLA management system to see the details. -The CLA management system login URL is {{.URLOfCLAPlatform}}. +The CLA management system login URL is {{.URLOfCLAPlatform}} Have questions or need help? Just reply to this email and the {{.Org}} Community Support Team will help you sort it out.