ff24bc8cb8
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
16 lines
345 B
Go
16 lines
345 B
Go
package ak
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func (a *APIController) startPeriodicalTasks() {
|
|
go a.Server.TimerFlowCacheExpiry()
|
|
go func() {
|
|
for range time.Tick(time.Duration(a.GlobalConfig.CacheTimeoutFlows) * time.Second) {
|
|
a.logger.WithField("timer", "cache-timeout").Debug("Running periodical tasks")
|
|
a.Server.TimerFlowCacheExpiry()
|
|
}
|
|
}()
|
|
}
|