mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated task execution
This commit is contained in:
committed by
Dan Christian Bogos
parent
ffaac358d5
commit
5830d9fcf0
@@ -33,11 +33,14 @@ type Task struct {
|
||||
}
|
||||
|
||||
func (t *Task) Execute() error {
|
||||
return (&ActionTiming{
|
||||
Uuid: t.Uuid,
|
||||
ActionsID: t.ActionsID,
|
||||
accountIDs: utils.StringMap{t.AccountID: true},
|
||||
}).Execute(nil, nil)
|
||||
at := &ActionTiming{
|
||||
Uuid: t.Uuid,
|
||||
ActionsID: t.ActionsID,
|
||||
}
|
||||
if len(t.AccountID) != 0 {
|
||||
at.accountIDs = utils.StringMap{t.AccountID: true}
|
||||
}
|
||||
return at.Execute(nil, nil)
|
||||
}
|
||||
|
||||
// String implements utils.DataProvider
|
||||
@@ -51,7 +54,7 @@ func (t *Task) FieldAsInterface(fldPath []string) (iface interface{}, err error)
|
||||
return t.FieldAsString(fldPath)
|
||||
}
|
||||
|
||||
// FieldAsInterface implements utils.DataProvider
|
||||
// FieldAsString implements utils.DataProvider
|
||||
// ToDo: support Action fields
|
||||
func (t *Task) FieldAsString(fldPath []string) (s string, err error) {
|
||||
if len(fldPath) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user