mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
Add stub for Footprint update service
This commit is contained in:
parent
5b03cf826b
commit
7c51d88501
@ -4,5 +4,22 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
package taskManager
|
package taskManager
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/ClusterCockpit/cc-backend/pkg/log"
|
||||||
|
"github.com/go-co-op/gocron/v2"
|
||||||
|
)
|
||||||
|
|
||||||
func registerFootprintWorker() {
|
func registerFootprintWorker() {
|
||||||
|
log.Info("Register Footprint Update service")
|
||||||
|
d, _ := time.ParseDuration("10m")
|
||||||
|
s.NewJob(gocron.DurationJob(d),
|
||||||
|
gocron.NewTask(
|
||||||
|
func() {
|
||||||
|
t := time.Now()
|
||||||
|
log.Printf("Update Footprints started at %s", t.Format(time.RFC3339))
|
||||||
|
|
||||||
|
log.Print("Update Footprints done")
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user