fix telemetry: connection timeout in case of boom

This commit is contained in:
prplwtf 2024-04-10 19:41:19 +02:00
parent 600e342d77
commit 5bfe0d50f9
2 changed files with 3 additions and 2 deletions

View file

@ -23,10 +23,11 @@ class BlueprintTelemetryService
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_TIMEOUT => 3,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_CONNECTTIMEOUT => 2,
));
$response = curl_exec($curl);

View file

@ -21,7 +21,7 @@ sendTelemetry() {
if [[ $key == "KEY_NOT_UPDATED" ]]; then
exit 1
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 ===