Fix config timestamps

created_at represents the time when the configuration has been persisted to disk.
loaded_at represents the time when the configuration has actually been used.

If created_at is larger than loaded_at, then the Core needs a reload in order
to apply the latest configuration.

if created_at is lower than laoded_at, then the Core applied the latest
configuration.

The value of updated_at is irrelevant and shouldn't be used.
This commit is contained in:
Ingo Oppermann
2023-01-19 16:13:53 +01:00
parent 311defb27c
commit e374f83377
4 changed files with 17 additions and 13 deletions

View File

@@ -257,6 +257,8 @@ func (a *api) Reload() error {
return fmt.Errorf("not all variables are set or valid")
}
cfg.LoadedAt = time.Now()
store.SetActive(cfg)
a.config.store = store