Skip to content

Commit f9df7f7

Browse files
committed
Notification method change
1 parent 20ebc8d commit f9df7f7

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ builddeploy_steps: &builddeploy_steps
4444
# # notify deployment
4545
# rm -rf buildenvvar
4646
# ./unsetenv.sh
47-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-notify-deployvar
48-
source buildenvvar
49-
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-notify-appvar -i ${APPNAME}
47+
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-notify-deployvar
48+
# source buildenvvar
49+
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-notify-appvar -i ${APPNAME}
5050
# # consumer deployment
5151
# rm -rf buildenvvar
5252
# ./unsetenv.sh
53-
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-consumer-deployvar
54-
# source buildenvvar
55-
# ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
53+
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-consumer-deployvar
54+
source buildenvvar
55+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
5656
# # without kafka dynamodb
5757
# rm -rf buildenvvar
5858
# ./unsetenv.sh

src/consumer.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ async function dataHandler(messageSet, topic, partition) {
112112
if (reconcile_flag != 0) {
113113
msgValue.msginfo = `Reconcile failed. \n` +
114114
`DB Operation: ${payload.OPERATION} \n ` +
115-
`Error code : ${msgValue.code}`
115+
`Error code : ${msgValue.code} \n` +
116+
`Error Detail : ${msgValue.detail}`
116117
logger.debug('Reconcile failed, sending it to error queue: ', config.topic_error.NAME);
117118
kafka_error = await pushToKafka(producer, config.topic_error.NAME, msgValue)
118119
if (!kafka_error) {
@@ -122,7 +123,8 @@ async function dataHandler(messageSet, topic, partition) {
122123
`SequnceId : ${payload.SEQ_ID} \n` +
123124
`Status : Reconcile failed. Also unable to post the info in kafka error topic channel due to errors \n` +
124125
`DB Operation: ${payload.OPERATION} \n ` +
125-
`Error code : ${msgValue.code}`
126+
`Error code : ${msgValue.code} \n` +
127+
`Error Detail : ${msgValue.detail}`
126128
notify_msg = "consumer_reconcile post fails - unable to post the error in kafka failure topic due to some errors"
127129
await slack.send_msg_to_slack(notify_msg);
128130
}
@@ -141,7 +143,8 @@ async function dataHandler(messageSet, topic, partition) {
141143
logger.debug('Reached at max retry counter, sending it to error queue: ', config.topic_error.NAME);
142144
msgValue.msginfo = `Max Retry Reached. \n` +
143145
`DB Operation: ${payload.OPERATION} \n ` +
144-
`Error code : ${msgValue.code}`
146+
`Error code : ${msgValue.code} \n` +
147+
`Error Detail : ${msgValue.detail}`
145148
kafka_error = await pushToKafka(producer, config.topic_error.NAME, msgValue)
146149
if (!kafka_error) {
147150
logger.info("Kafka Message posted successfully to the topic : " + config.topic_error.NAME)
@@ -150,7 +153,8 @@ async function dataHandler(messageSet, topic, partition) {
150153
`SequnceId : ${payload.SEQ_ID} \n` +
151154
`Status : Max Retry Reached. Also unable to post the info in kafka error topic channel due to errors \n` +
152155
`DB Operation: ${payload.OPERATION} \n ` +
153-
`Error code : ${msgValue.code}`
156+
`Error code : ${msgValue.code} \n` +
157+
`Error Detail : ${msgValue.detail}`
154158
await slack.send_msg_to_slack(notify_msg);
155159
}
156160
} else {

0 commit comments

Comments
 (0)