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

25 lines
679 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMetrics = void 0;
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}
`;
exports.getMetrics = {
name: 'getMetrics',
content,
keys: 2,
};
//# sourceMappingURL=getMetrics-2.js.map