mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
convert *max/min_counter to *max/min_event_counter
this is the default behavior
This commit is contained in:
@@ -226,6 +226,10 @@ func (mig MigratorRC8) migrateAccounts() error {
|
||||
MinQueuedItems: oldAtr.MinQueuedItems,
|
||||
Executed: oldAtr.Executed,
|
||||
}
|
||||
if newAcc.ActionTriggers[index].ThresholdType == "*min_counter" ||
|
||||
newAcc.ActionTriggers[index].ThresholdType == "*max_counter" {
|
||||
newAcc.ActionTriggers[index].ThresholdType = strings.Replace(newAcc.ActionTriggers[index].ThresholdType, "_", "_event_", 1)
|
||||
}
|
||||
}
|
||||
newAccounts[keyIndex] = newAcc
|
||||
}
|
||||
@@ -286,6 +290,10 @@ func (mig MigratorRC8) migrateActionTriggers() error {
|
||||
MinQueuedItems: oldAtr.MinQueuedItems,
|
||||
Executed: oldAtr.Executed,
|
||||
}
|
||||
if newAtrs[index].ThresholdType == "*min_counter" ||
|
||||
newAtrs[index].ThresholdType == "*max_counter" {
|
||||
newAtrs[index].ThresholdType = strings.Replace(newAtrs[index].ThresholdType, "_", "_event_", 1)
|
||||
}
|
||||
}
|
||||
newAtrsMap[key] = newAtrs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user