Updated ansible for integration tests

This commit is contained in:
Trial97
2021-05-19 19:21:39 +03:00
committed by Dan Christian Bogos
parent 116e778228
commit a4eb383938
2 changed files with 11 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ cgrates (0.10.3~dev) UNRELEASED; urgency=medium
* [FilterS] Optimized the automated index fields matching
* [AgentS] Added *routes_maxcost flag
* [SessionS] Replaced max_call_duration config with default_usage for each ToR
* [SessionS] The sessions are no longer terminated on shutdown if the replication_conns are set
-- DanB <danb@cgrates.org> Thu, 08 Oct 2020 16:23:58 +0300

View File

@@ -118,8 +118,16 @@ func (sS *SessionS) ListenAndServe(exitChan chan bool) (err error) {
// Shutdown is called by engine to clear states
func (sS *SessionS) Shutdown() (err error) {
for _, s := range sS.getSessions("", false) { // Force sessions shutdown
sS.terminateSession(s, nil, nil, nil, false)
if len(sS.cgrCfg.SessionSCfg().ReplicationConns) == 0 {
var hasErr bool
for _, s := range sS.getSessions("", false) { // Force sessions shutdown
if err = sS.terminateSession(s, nil, nil, nil, false); err != nil {
hasErr = true
}
}
if hasErr {
return utils.ErrPartiallyExecuted
}
}
return
}