recoder-code
Version:
Complete AI-powered development platform with ML model training, plugin registry, real-time collaboration, monitoring, infrastructure automation, and enterprise deployment capabilities
48 lines • 1.57 kB
JavaScript
/**
* Queue management for Plugin Registry Service
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getQueues = exports.initializeQueues = void 0;
const bull_1 = __importDefault(require("bull"));
const redis_1 = require("./redis");
let queueManager;
function initializeQueues() {
const redis = (0, redis_1.getRedis)();
queueManager = {
packageAnalysis: new bull_1.default('package-analysis', {
redis: {
host: redis.options.host,
port: redis.options.port,
password: redis.options.password,
},
}),
securityScan: new bull_1.default('security-scan', {
redis: {
host: redis.options.host,
port: redis.options.port,
password: redis.options.password,
},
}),
downloadStats: new bull_1.default('download-stats', {
redis: {
host: redis.options.host,
port: redis.options.port,
password: redis.options.password,
},
}),
};
return queueManager;
}
exports.initializeQueues = initializeQueues;
function getQueues() {
if (!queueManager) {
throw new Error('Queues not initialized. Call initializeQueues() first.');
}
return queueManager;
}
exports.getQueues = getQueues;
//# sourceMappingURL=queues.js.map
;