fix: I forgot to start the scheduler...
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
5321a86b2c
commit
32517b4e41
8
main.go
8
main.go
@ -166,17 +166,17 @@ func run(ctx *cli.Context) error {
|
||||
updateMetrics(&metrics, lastUpdatedMetric)
|
||||
},
|
||||
),
|
||||
gocron.WithStartAt(gocron.WithStartImmediately()),
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("Failed to create periodic task")
|
||||
return err
|
||||
}
|
||||
|
||||
// Perform an initial run to populate the metrics
|
||||
log.Info("Performing initial requests...")
|
||||
updateMetrics(&metrics, lastUpdatedMetric)
|
||||
log.Debug("Done")
|
||||
// Start the scheduler
|
||||
scheduler.Start()
|
||||
|
||||
// Handle HTTP requests
|
||||
http.Handle(
|
||||
"/metrics", promhttp.HandlerFor(
|
||||
registry,
|
||||
|
Loading…
Reference in New Issue
Block a user