@@ -115,9 +115,9 @@ function checkRasaUI() {
115
115
}
116
116
117
117
function checkDB ( ) {
118
+ var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
118
119
db . one ( 'select current_database(), current_schema(), inet_server_port(), inet_server_addr()' )
119
120
. then ( function ( data ) {
120
- var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
121
121
console . log ( '' ) ;
122
122
console . log ( 'Postgres DB Connected' ) ;
123
123
console . log ( 'Using connection string from: ' + dbconn ) ;
@@ -127,24 +127,22 @@ function checkDB() {
127
127
console . log ( '' ) ;
128
128
} )
129
129
. catch ( function ( err ) {
130
- var dbconn = process . env . postgresserver != undefined ? 'process.env.postgresserver' : 'package.json' ;
131
130
console . log ( 'Postgres DB Connection Error: ' + err ) ;
132
131
console . log ( 'Using connection string from: ' + dbconn ) ;
133
132
} ) ;
134
133
}
135
134
136
135
function checkRasaNLU ( ) {
136
+ var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
137
137
request ( global . rasanluendpoint + '/config' , function ( error , response , body ) {
138
138
try {
139
139
if ( body !== undefined ) {
140
- var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
141
140
console . log ( '' ) ;
142
141
console . log ( 'Rasa NLU Connected' ) ;
143
142
console . log ( 'Using connection string from: ' + rasaconn ) ;
144
143
console . log ( 'Rasa NLU Server: ' + global . rasanluendpoint ) ;
145
144
}
146
145
if ( error !== null ) {
147
- var rasaconn = process . env . rasanluendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
148
146
console . log ( '' ) ;
149
147
console . log ( 'Rasa NLU Error: ' + error ) ;
150
148
console . log ( 'Using connection string from: ' + rasaconn ) ;
@@ -157,16 +155,19 @@ function checkRasaNLU() {
157
155
}
158
156
159
157
function checkRasaCore ( ) {
158
+ var rasacoreconn = process . env . rasacoreendpoint != undefined ? 'process.env.rasanluendpoint' : 'package.json' ;
160
159
request ( global . rasacoreendpoint + '/version' , function ( error , response , body ) {
161
160
try {
162
161
if ( body !== undefined ) {
163
162
console . log ( '' ) ;
164
163
console . log ( 'Rasa Core Connected' ) ;
164
+ console . log ( 'Using connection string from: ' + rasacoreconn ) ;
165
165
console . log ( 'Rasa Core Server: ' + global . rasacoreendpoint ) ;
166
166
}
167
167
if ( error !== null ) {
168
168
console . log ( '' ) ;
169
169
console . log ( 'Rasa Core Error: ' + error ) ;
170
+ console . log ( 'Using connection string from: ' + rasacoreconn ) ;
170
171
}
171
172
console . log ( '' ) ;
172
173
} catch ( err ) {
0 commit comments