mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
Fix for rename from ResourceLimit -> Resource
This commit is contained in:
@@ -220,7 +220,7 @@ func (ms *MapStorage) CacheDataFromDB(prefix string, IDs []string, mustBeCached
|
||||
utils.LCR_PREFIX,
|
||||
utils.ALIASES_PREFIX,
|
||||
utils.REVERSE_ALIASES_PREFIX,
|
||||
utils.ResourceLimitsPrefix,
|
||||
utils.ResourcesPrefix,
|
||||
utils.TimingsPrefix}, prefix) {
|
||||
return utils.NewCGRError(utils.REDIS,
|
||||
utils.MandatoryIEMissingCaps,
|
||||
@@ -284,7 +284,7 @@ func (ms *MapStorage) CacheDataFromDB(prefix string, IDs []string, mustBeCached
|
||||
_, err = ms.GetAlias(dataID, true, utils.NonTransactional)
|
||||
case utils.REVERSE_ALIASES_PREFIX:
|
||||
_, err = ms.GetReverseAlias(dataID, true, utils.NonTransactional)
|
||||
case utils.ResourceLimitsPrefix:
|
||||
case utils.ResourcesPrefix:
|
||||
_, err = ms.GetResourceCfg(dataID, true, utils.NonTransactional)
|
||||
case utils.TimingsPrefix:
|
||||
_, err = ms.GetTiming(dataID, true, utils.NonTransactional)
|
||||
@@ -1311,7 +1311,7 @@ func (ms *MapStorage) GetStructVersion() (rsv *StructVersion, err error) {
|
||||
func (ms *MapStorage) GetResourceCfg(id string, skipCache bool, transactionID string) (rl *ResourceCfg, err error) {
|
||||
ms.mu.RLock()
|
||||
defer ms.mu.RUnlock()
|
||||
key := utils.ResourceLimitsPrefix + id
|
||||
key := utils.ResourcesPrefix + id
|
||||
if !skipCache {
|
||||
if x, ok := cache.Get(key); ok {
|
||||
if x != nil {
|
||||
@@ -1345,7 +1345,7 @@ func (ms *MapStorage) SetResourceCfg(r *ResourceCfg, transactionID string) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
key := utils.ResourceLimitsPrefix + r.ID
|
||||
key := utils.ResourcesPrefix + r.ID
|
||||
ms.dict[key] = result
|
||||
return nil
|
||||
}
|
||||
@@ -1353,7 +1353,7 @@ func (ms *MapStorage) SetResourceCfg(r *ResourceCfg, transactionID string) error
|
||||
func (ms *MapStorage) RemoveResourceCfg(id string, transactionID string) error {
|
||||
ms.mu.Lock()
|
||||
defer ms.mu.Unlock()
|
||||
key := utils.ResourceLimitsPrefix + id
|
||||
key := utils.ResourcesPrefix + id
|
||||
delete(ms.dict, key)
|
||||
cache.RemKey(key, cacheCommit(transactionID), transactionID)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user