// Imports import { Worker } from "rabbiteer"; // Class export default class KubeJobsWorker extends Worker { constructor() { super("KubeJobs"); } async configure(ch) { await ch.assertExchange("KubeJobsExchange", "direct"); await ch.assertQueue(this.queue, this.queueOptions); await ch.bindQueue(this.queue, "KubeJobsExchange", "KubeJobs"); await ch.consume(this.queue, (msg) => this.consume(msg, () => ch.ack(msg))); } onMessage(string) { console.log(`Died: ${string}`); } }