From eee83903194973e51fd91a8fac2cf91cd573fe84 Mon Sep 17 00:00:00 2001 From: DanB Date: Sun, 1 Jul 2018 11:53:42 +0200 Subject: [PATCH] Guardian logging keys which are timingout for locks --- guardian/guardian.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guardian/guardian.go b/guardian/guardian.go index f1b417d54..4855dbb20 100644 --- a/guardian/guardian.go +++ b/guardian/guardian.go @@ -19,8 +19,11 @@ along with this program. If not, see package guardian import ( + "fmt" "sync" "time" + + "github.com/cgrates/cgrates/utils" ) // global package variable @@ -112,6 +115,7 @@ func (gl *GuardianLocker) GuardIDs(timeout time.Duration, lockIDs ...string) { if timeout != 0 { go func(timeout time.Duration, lockIDs ...string) { time.Sleep(timeout) + utils.Logger.Warning(fmt.Sprintf(" WARNING: force timing-out locks: %+v", lockIDs)) gl.UnguardIDs(lockIDs...) }(timeout, lockIDs...) }