mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Updated scheduler
This commit is contained in:
@@ -48,11 +48,10 @@ type ActionTiming struct {
|
||||
// Tasks converts an ActionTiming into multiple Tasks
|
||||
func (at *ActionTiming) Tasks() (tsks []*Task) {
|
||||
if len(at.accountIDs) == 0 {
|
||||
return []*Task{
|
||||
&Task{
|
||||
Uuid: at.Uuid,
|
||||
ActionsID: at.ActionsID,
|
||||
}}
|
||||
return []*Task{{
|
||||
Uuid: at.Uuid,
|
||||
ActionsID: at.ActionsID,
|
||||
}}
|
||||
}
|
||||
tsks = make([]*Task, len(at.accountIDs))
|
||||
i := 0
|
||||
|
||||
@@ -58,10 +58,10 @@ func NewScheduler(dm *engine.DataManager, cfg *config.CGRConfig,
|
||||
}
|
||||
|
||||
func (s *Scheduler) updateActStats(act *engine.Action, isFailed bool) {
|
||||
mux := s.aSMux
|
||||
mux := &s.aSMux
|
||||
statsMp := s.actSuccessStats
|
||||
if isFailed {
|
||||
mux = s.aFMux
|
||||
mux = &s.aFMux
|
||||
statsMp = s.actFailedStats
|
||||
}
|
||||
now := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user