feat(scheduler): 30s polling scheduler with pure NextRun/dueTaskIDs

This commit is contained in:
vasyansk committed 2026-07-03 13:07:05 +07:00
1 parent 8f93dcd97b
commit b9421d388c
3 files changed
+116

No files matched your search

+3
View File
@@ -13,6 +13,7 @@ import (
"github.com/vasyansk/imap-copier/internal/config"
"github.com/vasyansk/imap-copier/internal/httpapi"
"github.com/vasyansk/imap-copier/internal/orchestrator"
"github.com/vasyansk/imap-copier/internal/scheduler"
"github.com/vasyansk/imap-copier/internal/store"
"github.com/vasyansk/imap-copier/internal/wshub"
)
@@ -45,6 +46,8 @@ func main() {
orch := orchestrator.New(st, hub, cfg.EncKey, cfg.WorkerConcurrency)
srv := httpapi.NewServer(cfg, st, orch, hub)
go scheduler.New(st, orch).Start(context.Background())
slog.Info("listening", "addr", cfg.HTTPAddr)
if err := http.ListenAndServe(cfg.HTTPAddr, srv.Router()); err != nil {
slog.Error("serve", "err", err)