summaryrefslogtreecommitdiff
path: root/internal/server/cron
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-11 15:07:16 +0300
committerPaul Buetow <paul@buetow.org>2024-08-11 15:07:16 +0300
commit5f34aa03f262837f6fb475490c3467880a1ea041 (patch)
tree3eb7a8b0898fa62a21c5022759f77baf39586209 /internal/server/cron
parent8eba8522dc6fb9a558fa88d4f6abc45eeb1e58c9 (diff)
more on this
Diffstat (limited to 'internal/server/cron')
-rw-r--r--internal/server/cron/cron.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/server/cron/cron.go b/internal/server/cron/cron.go
index 6e1c5fa..bdf7fae 100644
--- a/internal/server/cron/cron.go
+++ b/internal/server/cron/cron.go
@@ -6,9 +6,10 @@ import (
"time"
config "codeberg.org/snonux/gos/internal/config/server"
+ "codeberg.org/snonux/gos/internal/server/handler"
)
-func Start(ctx context.Context, conf config.ServerConfig) error {
+func Start(ctx context.Context, conf config.ServerConfig, hand handler.Handler) error {
go func() {
helloTicker := time.NewTicker(10 * time.Second)
mergeTicker := time.NewTicker(time.Duration(conf.CRONMergeIntervalS) * time.Second)
@@ -24,5 +25,6 @@ func Start(ctx context.Context, conf config.ServerConfig) error {
}
}
}()
+
return nil
}