mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
remove init for failed posts cache
This commit is contained in:
committed by
Dan Christian Bogos
parent
e0f2f3c937
commit
4714fb783b
@@ -36,12 +36,8 @@ import (
|
||||
|
||||
var failedPostCache *ltcache.Cache
|
||||
|
||||
func init() {
|
||||
failedPostCache = ltcache.NewCache(-1, 5*time.Second, true, false, []func(itmID string, value any){writeFailedPosts})
|
||||
}
|
||||
|
||||
// SetFailedPostCacheTTL recreates the failed cache
|
||||
func SetFailedPostCacheTTL(ttl time.Duration, static bool) {
|
||||
// InitFailedPostCache initializes the failed posts cache.
|
||||
func InitFailedPostCache(ttl time.Duration, static bool) {
|
||||
failedPostCache = ltcache.NewCache(-1, ttl, static, false, []func(itmID string, value any){writeFailedPosts})
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s *LoggerService) Start(_ *utils.SyncedChan, registry *servmanager.Service
|
||||
}
|
||||
cm := cms.(*ConnManagerService).ConnManager()
|
||||
utils.Logger = engine.NewExportLogger(context.TODO(), s.cfg.GeneralCfg().DefaultTenant, cm, s.cfg)
|
||||
efs.SetFailedPostCacheTTL(s.cfg.EFsCfg().FailedPostsTTL, s.cfg.EFsCfg().FailedPostsStaticTTL)
|
||||
efs.InitFailedPostCache(s.cfg.EFsCfg().FailedPostsTTL, s.cfg.EFsCfg().FailedPostsStaticTTL)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user