Minor Adjustments
This commit is contained in:
parent
ba8e6ded26
commit
a90c28dd76
60 changed files with 8240 additions and 8 deletions
19
libold/server/rabbit/workers/KubeJobsWorker.js
Normal file
19
libold/server/rabbit/workers/KubeJobsWorker.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
// 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}`);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue