16 lines
508 B
JavaScript
16 lines
508 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.CommandService = void 0;
|
|
const logger_1 = require("./logger");
|
|
const logger = (0, logger_1.getLogger)("CommandService");
|
|
class CommandService {
|
|
constructor(channel) {
|
|
this.channel = channel;
|
|
}
|
|
async send(queue, command) {
|
|
await this.channel.sendToQueue(queue, Buffer.from(JSON.stringify(command)));
|
|
logger.debug("Command sent", command);
|
|
}
|
|
}
|
|
exports.CommandService = CommandService;
|