You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function _M.getSubscriptions(red, artifactId, tenantId, snapshotId)
local res = red:scan(0, "match", utils.concatStrings({"subscriptions:tenant:", tenantId, ":api:", artifactId, ":"}))
local cursor = res[1]
local subscriptions = {}
for _, v in pairs(res[2]) do
local matched = {string.match(v, "subscriptions:tenant:([^:]+):api:([^:]+):([^:]+):([^:]+):")}
subscriptions[#subscriptions + 1] = matched[4]
end
while cursor ~= "0" do
res = red:scan(cursor, "match", utils.concatStrings({"subscriptions:tenant:", tenantId, ":api:", artifactId, ":"}))
cursor = res[1]
for _, v in pairs(res[2]) do
local matched = {string.match(v, "subscriptions:tenant:([^:]+):api:([^:]+):([^:]+):([^:]+):")}
subscriptions[#subscriptions + 1] = matched[4]
end
end
return subscriptions
end
The text was updated successfully, but these errors were encountered:
function _M.getSubscriptions(red, artifactId, tenantId, snapshotId)
local res = red:scan(0, "match", utils.concatStrings({"subscriptions:tenant:", tenantId, ":api:", artifactId, ":"}))
local cursor = res[1]
local subscriptions = {}
for _, v in pairs(res[2]) do
local matched = {string.match(v, "subscriptions:tenant:([^:]+):api:([^:]+):([^:]+):([^:]+):")}
subscriptions[#subscriptions + 1] = matched[4]
end
while cursor ~= "0" do
res = red:scan(cursor, "match", utils.concatStrings({"subscriptions:tenant:", tenantId, ":api:", artifactId, ":"}))
cursor = res[1]
for _, v in pairs(res[2]) do
local matched = {string.match(v, "subscriptions:tenant:([^:]+):api:([^:]+):([^:]+):([^:]+):")}
subscriptions[#subscriptions + 1] = matched[4]
end
end
return subscriptions
end
The text was updated successfully, but these errors were encountered: