@@ -115,9 +115,9 @@ function checkRasaUI() {
115115}
116116
117117function checkDB ( ) {
118+ var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
118119 db . one ( 'select current_database(), current_schema(), inet_server_port(), inet_server_addr()' )
119120 . then ( function ( data ) {
120- var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
121121 console . log ( '' ) ;
122122 console . log ( 'Postgres DB Connected' ) ;
123123 console . log ( 'Using connection string from: ' + dbconn ) ;
@@ -127,24 +127,22 @@ function checkDB() {
127127 console . log ( '' ) ;
128128 } )
129129 . catch ( function ( err ) {
130- var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
131130 console . log ( 'Postgres DB Connection Error: ' + err ) ;
132131 console . log ( 'Using connection string from: ' + dbconn ) ;
133132 } ) ;
134133}
135134
136135function checkRasaNLU ( ) {
136+ var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
137137 request ( global . rasanluendpoint + '/config' , function ( error , response , body ) {
138138 try {
139139 if ( body !== undefined ) {
140- var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
141140 console . log ( '' ) ;
142141 console . log ( 'Rasa NLU Connected' ) ;
143142 console . log ( 'Using connection string from: ' + rasaconn ) ;
144143 console . log ( 'Rasa NLU Server: ' + global . rasanluendpoint ) ;
145144 }
146145 if ( error !== null ) {
147- var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
148146 console . log ( '' ) ;
149147 console . log ( 'Rasa NLU Error: ' + error ) ;
150148 console . log ( 'Using connection string from: ' + rasaconn ) ;
@@ -157,16 +155,19 @@ function checkRasaNLU() {
157155}
158156
159157function checkRasaCore ( ) {
158+ var rasacoreconn = process . env . rasacoreendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
160159 request ( global . rasacoreendpoint + '/version' , function ( error , response , body ) {
161160 try {
162161 if ( body !== undefined ) {
163162 console . log ( '' ) ;
164163 console . log ( 'Rasa Core Connected' ) ;
164+ console . log ( 'Using connection string from: ' + rasacoreconn ) ;
165165 console . log ( 'Rasa Core Server: ' + global . rasacoreendpoint ) ;
166166 }
167167 if ( error !== null ) {
168168 console . log ( '' ) ;
169169 console . log ( 'Rasa Core Error: ' + error ) ;
170+ console . log ( 'Using connection string from: ' + rasacoreconn ) ;
170171 }
171172 console . log ( '' ) ;
172173 } catch ( err ) {
0 commit comments