redis-smq
Version:
A high-performance, reliable, and scalable message queue for Node.js.
28 lines • 974 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalEventBus = void 0;
const redis_smq_common_1 = require("redis-smq-common");
const redis_config_js_1 = require("../common/redis/redis-config.js");
class InternalEventBus {
constructor() { }
static getInstance() {
if (!InternalEventBus.instance) {
const cfg = {
redis: redis_config_js_1.RedisConfig.getConfig(),
};
InternalEventBus.instance = new redis_smq_common_1.EventBusRedis(cfg, 'system');
}
return InternalEventBus.instance;
}
static shutdown(cb) {
if (InternalEventBus.instance)
return InternalEventBus.instance.shutdown(() => {
InternalEventBus.instance = null;
cb();
});
cb();
}
}
exports.InternalEventBus = InternalEventBus;
InternalEventBus.instance = null;
//# sourceMappingURL=internal-event-bus.js.map