feat: fire scheduled workflow runs from the housekeeping leader
This commit is contained in:
@@ -11,6 +11,12 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
// Embeds the IANA zone database in the binary. Load-bearing: server/Dockerfile
|
||||
// builds on Alpine, which ships no zoneinfo, so without this
|
||||
// time.LoadLocation("Europe/London") fails in production and every workflow
|
||||
// schedule silently falls back to UTC.
|
||||
_ "time/tzdata"
|
||||
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/api"
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/auth"
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/bus"
|
||||
@@ -18,6 +24,7 @@ import (
|
||||
grpcserver "gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/grpc"
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/monitorsched"
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/services"
|
||||
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/workflowsched"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -179,6 +186,10 @@ func serve() {
|
||||
services.StartAuditSweeper(jobCtx)
|
||||
services.StartReaper(jobCtx)
|
||||
monitorsched.Start(jobCtx)
|
||||
workflowsched.Start(jobCtx, workflowsched.Deps{
|
||||
TriggerWorkflow: services.TriggerWorkflow,
|
||||
LogEvent: services.LogEvent,
|
||||
})
|
||||
|
||||
ticker := time.NewTicker(2 * time.Minute)
|
||||
defer ticker.Stop()
|
||||
|
||||
Reference in New Issue
Block a user