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. 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 } 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)) } } }