Skip to content

Commit fb05597

Browse files
committed
Code formatting
1 parent 674c6f5 commit fb05597

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/scheduler/rabbitmq/Producer.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
import { Replies, Message } from "amqplib/callback_api";
2-
31
import AMQBBase from "./amqpBase";
42
import logger from "../../logger/logger";
53

6-
74
class Producer extends AMQBBase {
8-
9-
private static LOG_TAG = "Producer"
5+
private static LOG_TAG = "Producer";
106

117
public static create(url: string): Producer {
128
return new Producer(url);
@@ -29,12 +25,12 @@ class Producer extends AMQBBase {
2925

3026
return new Promise((resolve, reject) => {
3127
this.assertExchange(INTERMEDIATE_EXCHANGE, INTERMEDIATE_EXCHANGE_TYPE)
32-
.then(_ => this.assertExchange(FINAL_EXCHANGE, FINAL_EXCHANGE_TYPE))
33-
.then(_ => this.assertQueue(INTERMEDIATE_QUEUE, { deadLetterExchange: FINAL_EXCHANGE, }))
34-
.then(_ => this.assertQueue(FINAL_QUEUE, {}))
35-
.then(_ => this.bindQueue(INTERMEDIATE_QUEUE, INTERMEDIATE_EXCHANGE, ""))
36-
.then(_ => this.bindQueue(FINAL_QUEUE, FINAL_EXCHANGE, ""))
37-
.then(_ => {
28+
.then((_) => this.assertExchange(FINAL_EXCHANGE, FINAL_EXCHANGE_TYPE))
29+
.then((_) => this.assertQueue(INTERMEDIATE_QUEUE, { deadLetterExchange: FINAL_EXCHANGE }))
30+
.then((_) => this.assertQueue(FINAL_QUEUE, {}))
31+
.then((_) => this.bindQueue(INTERMEDIATE_QUEUE, INTERMEDIATE_EXCHANGE, ""))
32+
.then((_) => this.bindQueue(FINAL_QUEUE, FINAL_EXCHANGE, ""))
33+
.then((_) => {
3834
this.channel?.sendToQueue(INTERMEDIATE_QUEUE, Buffer.from(data), {
3935
expiration: delayInMills,
4036
});

0 commit comments

Comments
 (0)