Commit 3ebd7e09 authored by Christopher Fullarton's avatar Christopher Fullarton

Adds checks if the amqp channel has an error

parent 6535cccb
Pipeline #30756 passed with stages
in 2 minutes and 50 seconds
......@@ -32,6 +32,9 @@ class AMQPConnector {
vhost: settings.amqp.vhost,
});
this._channel = await this._connection.createChannel();
this._channel.on('error', error => {
console.error('Exception in amqp channel occured', error);
});
}
}
......
......@@ -212,10 +212,7 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
status: StatusProtocol.Success,
step: MessageProtocol.Closed,
})));
try {
AMQPConnector.channel.checkExchange(this._exchangeName).then(() => AMQPConnector.channel.deleteExchange(this._exchangeName));
} catch {
}
AMQPConnector.channel.deleteExchange(this._exchangeName);
}
public reset(): void {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment