fix telemetry
: connection timeout in case of boom
This commit is contained in:
parent
600e342d77
commit
5bfe0d50f9
2 changed files with 3 additions and 2 deletions
|
@ -23,10 +23,11 @@ class BlueprintTelemetryService
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_ENCODING => '',
|
CURLOPT_ENCODING => '',
|
||||||
CURLOPT_MAXREDIRS => 10,
|
CURLOPT_MAXREDIRS => 10,
|
||||||
CURLOPT_TIMEOUT => 0,
|
CURLOPT_TIMEOUT => 3,
|
||||||
CURLOPT_FOLLOWLOCATION => true,
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
CURLOPT_CUSTOMREQUEST => 'GET',
|
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||||
|
CURLOPT_CONNECTTIMEOUT => 2,
|
||||||
));
|
));
|
||||||
|
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
|
|
|
@ -21,7 +21,7 @@ sendTelemetry() {
|
||||||
if [[ $key == "KEY_NOT_UPDATED" ]]; then
|
if [[ $key == "KEY_NOT_UPDATED" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
curl --location --silent "http://api.blueprint.zip:50000/send/$key/$1" > /dev/null
|
curl --location --silent --connect-timeout 3 "http://api.blueprint.zip:50000/send/$key/$1" &
|
||||||
}
|
}
|
||||||
|
|
||||||
# === CACHEREMINDER ===
|
# === CACHEREMINDER ===
|
||||||
|
|
Loading…
Reference in a new issue