mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Disable marking events to be stored if storeInterval is 0 for resources and stats
This commit is contained in:
@@ -574,9 +574,12 @@ func (rS *ResourceService) V1AllocateResource(args utils.ArgRSv1ResourceUsage, r
|
||||
}
|
||||
// index it for storing
|
||||
for _, r := range mtcRLs {
|
||||
if rS.storeInterval == 0 || r.dirty == nil {
|
||||
continue
|
||||
}
|
||||
if rS.storeInterval == -1 {
|
||||
rS.StoreResource(r)
|
||||
} else if r.dirty != nil {
|
||||
} else {
|
||||
*r.dirty = true // mark it to be saved
|
||||
rS.srMux.Lock()
|
||||
rS.storedResources[r.TenantID()] = true
|
||||
|
||||
@@ -213,9 +213,12 @@ func (sS *StatService) processEvent(ev *StatEvent) (err error) {
|
||||
sq.TenantID(), ev.TenantID(), err.Error()))
|
||||
withErrors = true
|
||||
}
|
||||
if sS.storeInterval == 0 || sq.dirty == nil { // don't save
|
||||
continue
|
||||
}
|
||||
if sS.storeInterval == -1 {
|
||||
sS.StoreStatQueue(sq)
|
||||
} else if sq.dirty != nil {
|
||||
} else {
|
||||
*sq.dirty = true // mark it to be saved
|
||||
sS.ssqMux.Lock()
|
||||
sS.storedStatQueues[sq.TenantID()] = true
|
||||
|
||||
Reference in New Issue
Block a user