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
mr12.1.1
Alessio Garzi 3 years ago
parent 8f553ad979
commit 0699ebc398

@ -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