MT#57706 New function del_pair in NGCPDlgCounters class

New function del_pair() is a copy of del() but it does not delete call counters
on db central. Useful if we want to clean pair db without changing db central.

Change-Id: I936bbb99ce9d5698273d8f72e0f032358bd341cd
(cherry picked from commit d9e55ae48c9fc86af88194dafebf9e236e24c14b)
mr11.3
Alessio Garzi 2 years ago
parent 703508a452
commit ac3f954d98

@ -182,6 +182,23 @@ end
end
end
function NGCPDlgCounters:del_pair(callid)
if not self.pair:test_connection() then
self.pair:connect()
end
local key = self.pair.client:lpop(callid);
if not key then
error(string.format("callid:%s list empty", callid));
end
if not self.central:test_connection() then
self.central:connect()
end
while key do
KSR.dbg(string.format("pair:lpop[%s]=>[%s]\n", callid, key));
key = self.pair.client:lpop(callid);
end
end
function NGCPDlgCounters:get(key)
if not self.central:test_connection() then
self.central:connect()

Loading…
Cancel
Save