Реализация на 5

This commit is contained in:
Grbisba
2026-11-13 12:48:18 +03:00
parent ce035c8528
commit 2198368a44
60 changed files with 3253 additions and 181 deletions
+8
View File
@@ -20,7 +20,9 @@ import (
"gitea.privcloud.tech/mtusi2026/internal/config"
"gitea.privcloud.tech/mtusi2026/internal/pkg/objectstore"
"gitea.privcloud.tech/mtusi2026/internal/pkg/postgres"
"gitea.privcloud.tech/mtusi2026/internal/pkg/postgres/txmanager"
"gitea.privcloud.tech/mtusi2026/internal/service/attachment"
"gitea.privcloud.tech/mtusi2026/internal/service/outbox"
)
func runStorage(cfg *config.Config, c *config.Attachment, args []string) error {
@@ -93,6 +95,12 @@ func runStorage(cfg *config.Config, c *config.Attachment, args []string) error {
pool := postgres.New(cfg.Postgres)
defer pool.Close()
svc := attachment.New(&storage.AttachmentsRepo{Pool: pool}, store, c, nil)
jobs, e := config.LoadPipeline()
if e != nil {
return e
}
tm := txmanager.New(pool)
svc.Configure(tm, outbox.New(&storage.OutboxRepo{Pool: pool}, tm, nil), jobs)
switch args[0] {
case "reconcile":
fs := flag.NewFlagSet("reconcile", flag.ContinueOnError)