Send mailing list emails

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-03-05 18:05:41 +01:00
parent aa01c40184
commit 85ec106cd6
67 changed files with 7615 additions and 160 deletions

View File

@@ -436,6 +436,8 @@ func (impl *Implm) Run(
l.Named("esign"),
)
mailmanService := mailman.NewService(pgClient, fileManagerService, impl.cfg.Auth.Cookie.Secret, baseURL, impl.cfg.AWS.Bucket, encryptionKey, l)
proboService, err := probo.NewService(
ctx,
encryptionKey,
@@ -472,8 +474,6 @@ func (impl *Implm) Run(
slackService,
)
mailmanService := mailman.NewService(pgClient)
serverHandler, err := server.NewServer(
server.Config{
AllowedOrigins: impl.cfg.Api.Cors.AllowedOrigins,
@@ -593,6 +593,16 @@ func (impl *Implm) Run(
},
)
mailingListWorker := mailman.NewMailingListWorker(mailmanService, pgClient, l.Named("mailing-list-worker"))
mailingListWorkerCtx, stopMailingListWorker := context.WithCancel(context.Background())
wg.Go(
func() {
if err := mailingListWorker.Run(mailingListWorkerCtx); err != nil {
cancel(fmt.Errorf("mailing list worker crashed: %w", err))
}
},
)
trustCenterServerCtx, stopTrustCenterServer := context.WithCancel(context.Background())
defer stopTrustCenterServer()
wg.Go(
@@ -619,6 +629,7 @@ func (impl *Implm) Run(
stopTrustCenterServer()
stopWebhookSender()
stopESignService()
stopMailingListWorker()
stopExportJobExporter()
stopIAMService()
stopMailer()