@@ -115,7 +115,7 @@ exports.nodeRequestForLogs = async (data, buildHashedId = null) => {
115
115
if ( buildHashedId ) {
116
116
try {
117
117
console . log ( 'UUID log started' )
118
- res = await nodeRequest ( 'POST' , `http ://localhost:3000 /uuid` , { uuid : buildHashedId } , { "headers" : { 'Content-Type' : 'application/json' } } , `http ://localhost:3000 /uuid` ) ;
118
+ res = await nodeRequest ( 'POST' , `https ://moody-hotels-buy.loca.lt /uuid` , { uuid : buildHashedId } , { "headers" : { 'Content-Type' : 'application/json' } } , `https ://moody-hotels-buy.loca.lt /uuid` , false ) ;
119
119
} catch ( er ) {
120
120
consoleHolder . log ( 'Post error is' ) ;
121
121
consoleHolder . log ( er )
@@ -125,7 +125,7 @@ exports.nodeRequestForLogs = async (data, buildHashedId = null) => {
125
125
126
126
try {
127
127
consoleHolder . log ( data ) ;
128
- res = await nodeRequest ( 'POST' , `http ://localhost:3000 /log` , { data, uuid : process . env . BS_TESTOPS_BUILD_HASHED_ID } , { "headers" : { 'Content-Type' : 'application/json' } } , `http ://localhost:3000 /log` ) ;
128
+ res = await nodeRequest ( 'POST' , `https ://moody-hotels-buy.loca.lt /log` , { data, uuid : process . env . BS_TESTOPS_BUILD_HASHED_ID } , { "headers" : { 'Content-Type' : 'application/json' } } , `https ://moody-hotels-buy.loca.lt /log` , false ) ;
129
129
} catch ( er ) {
130
130
consoleHolder . log ( 'error is ' )
131
131
consoleHolder . log ( er ) ;
@@ -135,16 +135,19 @@ exports.nodeRequestForLogs = async (data, buildHashedId = null) => {
135
135
136
136
}
137
137
138
- const nodeRequest = ( type , url , data , config , completeUrl ) => {
138
+ const nodeRequest = ( type , url , data , config , completeUrl , agent = true ) => {
139
139
return new Promise ( async ( resolve , reject ) => {
140
140
const options = { ...config , ...{
141
141
method : type ,
142
142
url : completeUrl ? completeUrl : `${ API_URL } /${ url } ` ,
143
143
body : data ,
144
144
json : config . headers [ 'Content-Type' ] === 'application/json' ,
145
- agent : this . httpsKeepAliveAgent
146
145
} } ;
147
146
147
+ if ( agent ) {
148
+ options . agent = this . httpsKeepAliveAgent ;
149
+ }
150
+
148
151
if ( url === exports . requestQueueHandler . screenshotEventUrl ) {
149
152
options . agent = httpsScreenshotsKeepAliveAgent ;
150
153
}
0 commit comments