Files
simple-mail-cleaner/backend/node_modules/bullmq/dist/esm/scripts/getMetrics-2.js
2026-01-22 15:49:12 +01:00

22 lines
578 B
JavaScript

const content = `--[[
Get metrics
Input:
KEYS[1] 'metrics' key
KEYS[2] 'metrics data' key
ARGV[1] start index
ARGV[2] end index
]]
local rcall = redis.call;
local metricsKey = KEYS[1]
local dataKey = KEYS[2]
local metrics = rcall("HMGET", metricsKey, "count", "prevTS", "prevCount")
local data = rcall("LRANGE", dataKey, tonumber(ARGV[1]), tonumber(ARGV[2]))
local numPoints = rcall("LLEN", dataKey)
return {metrics, data, numPoints}
`;
export const getMetrics = {
name: 'getMetrics',
content,
keys: 2,
};
//# sourceMappingURL=getMetrics-2.js.map