mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-16 09:41:47 +01:00
Cleanup print statements. Always enable Compression
This commit is contained in:
@@ -408,7 +408,6 @@ func (m *MemoryStore) FromCheckpointFiles(dir string, from int64) (int, error) {
|
|||||||
return m.FromCheckpoint(dir, from, altFormat)
|
return m.FromCheckpoint(dir, from, altFormat)
|
||||||
}
|
}
|
||||||
|
|
||||||
cclog.Info("[METRICSTORE]> No valid checkpoint files found")
|
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ func RegisterLdapSyncService(ds string) {
|
|||||||
|
|
||||||
auth := auth.GetAuthInstance()
|
auth := auth.GetAuthInstance()
|
||||||
|
|
||||||
cclog.Info("Register LDAP sync service")
|
cclog.Infof("register ldap sync service with %s interval", ds)
|
||||||
|
|
||||||
s.NewJob(gocron.DurationJob(interval),
|
s.NewJob(gocron.DurationJob(interval),
|
||||||
gocron.NewTask(
|
gocron.NewTask(
|
||||||
func() {
|
func() {
|
||||||
@@ -32,6 +33,5 @@ func RegisterLdapSyncService(ds string) {
|
|||||||
if err := auth.LdapAuth.Sync(); err != nil {
|
if err := auth.LdapAuth.Sync(); err != nil {
|
||||||
cclog.Errorf("ldap sync failed: %s", err.Error())
|
cclog.Errorf("ldap sync failed: %s", err.Error())
|
||||||
}
|
}
|
||||||
cclog.Print("ldap sync done")
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DefaultCompressOlderThen = 7
|
DefaultCompressOlderThan = 7
|
||||||
)
|
)
|
||||||
|
|
||||||
// Retention defines the configuration for job retention policies.
|
// Retention defines the configuration for job retention policies.
|
||||||
@@ -92,7 +92,7 @@ func initArchiveServices(config json.RawMessage) {
|
|||||||
if cfg.Compression > 0 {
|
if cfg.Compression > 0 {
|
||||||
RegisterCompressionService(cfg.Compression)
|
RegisterCompressionService(cfg.Compression)
|
||||||
} else {
|
} else {
|
||||||
RegisterCompressionService(DefaultCompressOlderThen)
|
RegisterCompressionService(DefaultCompressOlderThan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +118,9 @@ func Start(cronCfg, archiveConfig json.RawMessage) {
|
|||||||
|
|
||||||
if archiveConfig != nil {
|
if archiveConfig != nil {
|
||||||
initArchiveServices(archiveConfig)
|
initArchiveServices(archiveConfig)
|
||||||
|
} else {
|
||||||
|
// Always enable compression
|
||||||
|
RegisterCompressionService(DefaultCompressOlderThan)
|
||||||
}
|
}
|
||||||
|
|
||||||
lc := auth.Keys.LdapConfig
|
lc := auth.Keys.LdapConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user