File tree 4 files changed +14
-3
lines changed 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ "parserOptions": {
2
+ "ecmaVersion": 6
3
+ }
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ WORKDIR /opt/app
9
9
COPY . .
10
10
RUN npm install
11
11
RUN npm install dotenv --save
12
- # RUN npm test
12
+ RUN npm run lint
13
13
CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change @@ -33,8 +33,11 @@ module.exports = {
33
33
TEMPLATE_MAP : process . env . TEMPLATE_MAP ,
34
34
SENDGRID_API_KEY : process . env . SENDGRID_API_KEY || '' ,
35
35
EMAIL_FROM : process . env . EMAIL_FROM || 'no-reply@topcoder.com' ,
36
+
37
+ // temporary not in use feature
36
38
EMAIL_MAX_ERRORS : process . env . EMAIL_MAX_ERRORS || 2 ,
37
39
EMAIL_PAUSE_TIME : process . env . EMAIL_PAUSE_TIME || 30 ,
40
+
38
41
//in every 2 minutes will retry for failed status
39
42
EMAIL_RETRY_SCHEDULE : process . env . EMAIL_RETRY_SCHEDULE || '0 */2 * * * *' ,
40
43
} ;
Original file line number Diff line number Diff line change @@ -76,9 +76,14 @@ function configureKafkaConsumer(handlers) {
76
76
emailModel . status = 'SUCCESS' ;
77
77
return emailModel . save ( ) ;
78
78
} else {
79
- emailTries [ topicName ] += 1 ;
79
+ // emailTries[topicName] += 1; //temporary disabling this feature
80
80
emailModel . status = 'FAILED' ;
81
81
return emailModel . save ( ) . then ( ( ) => {
82
+ /*
83
+ * temporary disabling this feature as there is chance of losing message during
84
+ * unsubscribe/pausing due to simple kafka consumer
85
+ */
86
+ /*
82
87
const currentTries = emailTries[topicName];
83
88
if (currentTries > maxErrors) {
84
89
logger.debug(`Failed to send email. Will sleep for ${pauseTime}s`);
@@ -94,7 +99,7 @@ function configureKafkaConsumer(handlers) {
94
99
} else {
95
100
logger.debug(`Failed to send email (retries left ${maxErrors - currentTries})`);
96
101
throw result.error;
97
- }
102
+ }*/
98
103
} ) ;
99
104
}
100
105
} ) . then ( ( ) => consumer . commitOffset ( { topic, partition, offset : m . offset } ) ) // commit offset
You can’t perform that action at this time.
0 commit comments