Skip to content

Commit

Permalink
fix(review comments): skip message broker listener for STFC and remov…
Browse files Browse the repository at this point in the history
…e TODO comment
  • Loading branch information
martin-trajanovski committed Mar 27, 2023
1 parent d31ae00 commit 74cbdb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/user-office-backend/src/config/dependencyConfigSTFC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import { StfcUserDataSource } from '../datasources/stfc/StfcUserDataSource';
import { stfcEmailHandler } from '../eventHandlers/email/stfcEmailHandler';
import { SMTPMailService } from '../eventHandlers/MailService/SMTPMailService';
import {
createListenToRabbitMQHandler,
createPostToRabbitMQHandler,
createSkipListeningHandler,
} from '../eventHandlers/messageBroker';
import { SkipAssetRegistrar } from '../services/assetRegistrar/skip/SkipAssetRegistrar';
import { configureSTFCEnvironment } from './stfc/configureSTFCEnvironment';
Expand Down Expand Up @@ -76,7 +76,7 @@ mapClass(Tokens.MailService, SMTPMailService);
mapValue(Tokens.EmailEventHandler, stfcEmailHandler);

mapValue(Tokens.PostToMessageQueue, createPostToRabbitMQHandler());
mapValue(Tokens.ListenToMessageQueue, createListenToRabbitMQHandler());
mapValue(Tokens.ListenToMessageQueue, createSkipListeningHandler());

mapValue(Tokens.ConfigureEnvironment, configureSTFCEnvironment);
mapValue(Tokens.ConfigureLogger, () => setLogger(new ConsoleLogger()));
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ export async function createListenToRabbitMQHandler() {
.EVENT_SCHEDULING_QUEUE_NAME as Queue;
const SCHEDULER_EXCHANGE_NAME = process.env.SCHEDULER_EXCHANGE_NAME;

// TODO: Maybe we need to check if scheduler is enabled then throw these errors. Check this with STFC.
if (!SCHEDULER_EXCHANGE_NAME) {
throw new Error('SCHEDULER_EXCHANGE_NAME environment variable not set');
}
Expand Down

0 comments on commit 74cbdb7

Please sign in to comment.