From dc78aab70e60d4e4f4d08dba83cccdded8e38bad Mon Sep 17 00:00:00 2001 From: Markus Sommer Date: Mon, 13 Mar 2023 15:57:43 +0100 Subject: [PATCH] Actually use the parsed cron-interval, rather than a constant. --- cmd/dtnd/configuration.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/dtnd/configuration.go b/cmd/dtnd/configuration.go index a623d70..c64cfb3 100644 --- a/cmd/dtnd/configuration.go +++ b/cmd/dtnd/configuration.go @@ -309,7 +309,7 @@ func parseCron(config cronConf, c *routing.Core) (*routing.Cron, error) { if err != nil { return nil, NewConfigError(fmt.Sprintf("Error parsing duration: %v", config.CleanStore), err) } - if err := cron.Register("clean_store", c.Store.DeleteExpired, 10*time.Minute); err != nil { + if err := cron.Register("clean_store", c.Store.DeleteExpired, interval); err != nil { return nil, NewConfigError("Failed to register clean_store at cron", err) } @@ -317,7 +317,7 @@ func parseCron(config cronConf, c *routing.Core) (*routing.Cron, error) { if err != nil { return nil, NewConfigError(fmt.Sprintf("Error parsing duration: %v", config.CleanID), err) } - if err := cron.Register("clean_ids", c.IdKeeper.Clean, 10*time.Minute); err != nil { + if err := cron.Register("clean_ids", c.IdKeeper.Clean, interval); err != nil { return nil, NewConfigError("Failed to register clean_ids at cron", err) }