File tree 2 files changed +2
-12
lines changed 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,6 @@ function start() {
148
148
try {
149
149
await retryEmail ( handlers )
150
150
} catch ( err ) {
151
- console . log ( err ) ;
152
151
logger . error ( err ) ;
153
152
}
154
153
} ) ;
Original file line number Diff line number Diff line change @@ -57,26 +57,18 @@ async function dataHandler(consumer, handlers) {
57
57
// return null to ignore this message
58
58
return null ;
59
59
}
60
- console . log ( [ 1 ] )
61
60
const emailModel = await models . loadEmailModule ( )
62
61
const busPayload = JSON . parse ( message ) ;
63
62
const messageJSON = busPayload . payload ;
64
63
try {
65
-
66
64
const emailInfo = {
67
65
status : 'PENDING' ,
68
66
topicName,
69
67
data : JSON . stringify ( messageJSON ) ,
70
68
recipients : JSON . stringify ( messageJSON . recipients ) ,
71
69
}
72
70
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 )
80
72
const result = await handler ( topicName , messageJSON ) ;
81
73
82
74
logger . info ( 'info' , 'Email sent' , {
@@ -86,7 +78,7 @@ async function dataHandler(consumer, handlers) {
86
78
status : result . success ? 'Message accepted' : 'Message rejected' ,
87
79
error : result . error ? result . error . toString ( ) : 'No error message' ,
88
80
} ) ;
89
-
81
+ const emailTries = { }
90
82
if ( result . success ) {
91
83
emailTries [ topicName ] = 0 ;
92
84
emailModel . status = 'SUCCESS' ;
@@ -98,7 +90,6 @@ async function dataHandler(consumer, handlers) {
98
90
}
99
91
}
100
92
} catch ( e ) {
101
- console . log ( e )
102
93
logger . error ( e )
103
94
}
104
95
You can’t perform that action at this time.
0 commit comments