@@ -788,7 +788,7 @@ public function createExecution(
788788 \curl_setopt ($ ch , CURLOPT_POST , true );
789789 \curl_setopt ($ ch , CURLOPT_POSTFIELDS , $ body );
790790 \curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , true );
791- \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , 10 );
791+ \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , ( int )Http:: getEnv ( ' OPR_EXECUTOR_CONNECT_TIMEOUT ' , ' 10 ' ) );
792792
793793 \curl_setopt ($ ch , CURLOPT_HTTPHEADER , [
794794 'Content-Type: application/json ' ,
@@ -905,7 +905,7 @@ public function createExecution(
905905 \curl_setopt ($ ch , CURLOPT_POSTFIELDS , $ body );
906906 \curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , true );
907907 \curl_setopt ($ ch , CURLOPT_TIMEOUT , $ timeout );
908- \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , 10 );
908+ \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , ( int )Http:: getEnv ( ' OPR_EXECUTOR_CONNECT_TIMEOUT ' , ' 10 ' ) );
909909
910910 \curl_setopt ($ ch , CURLOPT_HTTPHEADER , [
911911 'Content-Type: application/json ' ,
@@ -995,7 +995,7 @@ public function createExecution(
995995 });
996996
997997 \curl_setopt ($ ch , CURLOPT_TIMEOUT , $ timeout + 5 ); // Gives extra 5s after safe timeout to recieve response
998- \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , 5 );
998+ \curl_setopt ($ ch , CURLOPT_CONNECTTIMEOUT , ( int )Http:: getEnv ( ' OPR_EXECUTOR_CONNECT_TIMEOUT ' , ' 5 ' ) );
999999 if ($ logging === true ) {
10001000 $ headers ['x-open-runtimes-logging ' ] = 'enabled ' ;
10011001 } else {
0 commit comments