Skip to content

Commit 0dae3c0

Browse files
author
Hamid Tavakoli
authored
Merge pull request #58 from topcoder-platform/feature/PLAT-1484
Clean up
2 parents fa01ae0 + 7c4dee6 commit 0dae3c0

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ function start() {
148148
try {
149149
await retryEmail(handlers)
150150
} catch (err) {
151-
console.log(err);
152151
logger.error(err);
153152
}
154153
});

src/init.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,18 @@ async function dataHandler(consumer, handlers) {
5757
// return null to ignore this message
5858
return null;
5959
}
60-
console.log([1])
6160
const emailModel = await models.loadEmailModule()
6261
const busPayload = JSON.parse(message);
6362
const messageJSON = busPayload.payload;
6463
try {
65-
6664
const emailInfo = {
6765
status: 'PENDING',
6866
topicName,
6967
data: JSON.stringify(messageJSON),
7068
recipients: JSON.stringify(messageJSON.recipients),
7169
}
7270

73-
try {
74-
console.log(emailModel)
75-
await emailModel.create(emailInfo)
76-
77-
} catch (err) {
78-
console.log(err)
79-
}
71+
await emailModel.create(emailInfo)
8072
const result = await handler(topicName, messageJSON);
8173

8274
logger.info('info', 'Email sent', {
@@ -86,7 +78,7 @@ async function dataHandler(consumer, handlers) {
8678
status: result.success ? 'Message accepted' : 'Message rejected',
8779
error: result.error ? result.error.toString() : 'No error message',
8880
});
89-
81+
const emailTries = {}
9082
if (result.success) {
9183
emailTries[topicName] = 0;
9284
emailModel.status = 'SUCCESS';
@@ -98,7 +90,6 @@ async function dataHandler(consumer, handlers) {
9890
}
9991
}
10092
} catch (e) {
101-
console.log(e)
10293
logger.error(e)
10394
}
10495

0 commit comments

Comments
 (0)