in scripts/lua/lib/redis.lua [468:483]
function _M.getAllResources(red, tenantId, snapshotId)
local key = utils.concatStrings({'resources:', tenantId, ':__index__'})
if snapshotId ~= nil then
key = utils.concatStrings({'snapshots:', snapshotId, ':', key})
end
local keys, err = smembers(red, key)
if not keys then
request.err(500, utils.concatStrings({"Failed to retrieve resource keys: ", err}))
end
local result = {}
for _, v in ipairs(keys) do
local str = v:gsub(utils.concatStrings({'snapshots:', snapshotId, ':', ''}), '')
table.insert(result, str)
end
return result
end