mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add prefix "*act" for scheduler filter
This commit is contained in:
committed by
Dan Christian Bogos
parent
2f3f7d2dea
commit
7c95645650
@@ -35,7 +35,7 @@
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
"filters": ["*suffix:~AccountID:1001"],
|
||||
"filters": ["*suffix:~*act.AccountID:1001"],
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
"filters": ["*suffix:~AccountID:1002;1003"],
|
||||
"filters": ["*suffix:~*act.AccountID:1002;1003"],
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ func (t *Task) FieldAsString(fldPath []string) (s string, err error) {
|
||||
if len(fldPath) == 0 {
|
||||
return
|
||||
}
|
||||
switch fldPath[0] {
|
||||
if fldPath[0] != utils.MetaAct || len(fldPath) < 2 {
|
||||
return "", utils.ErrPrefixNotFound(strings.Join(fldPath, utils.NestingSep))
|
||||
}
|
||||
switch fldPath[1] {
|
||||
case utils.UUID:
|
||||
return t.Uuid, nil
|
||||
case utils.AccountID:
|
||||
|
||||
@@ -572,6 +572,7 @@ const (
|
||||
QueryLow = "query"
|
||||
UUID = "UUID"
|
||||
ActionsID = "ActionsID"
|
||||
MetaAct = "*act"
|
||||
)
|
||||
|
||||
// Migrator Action
|
||||
|
||||
Reference in New Issue
Block a user