minfix: store api.response even if response error
This commit is contained in:
parent
9b580638ba
commit
37bb4368a7
|
@ -113,10 +113,13 @@
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
/* (2) Close request */
|
/* (2) Save response to file */
|
||||||
|
file_put_contents(TMP_DIR.'/api.response', $response);
|
||||||
|
|
||||||
|
/* (3) Close request */
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
/* (3) Return response as result */
|
/* (4) Return response as result */
|
||||||
if( $response === false ){
|
if( $response === false ){
|
||||||
slog("Request error", 'api:sync','update');
|
slog("Request error", 'api:sync','update');
|
||||||
return 127;
|
return 127;
|
||||||
|
@ -141,10 +144,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (3) Writes request to temporary pipe */
|
|
||||||
file_put_contents(TMP_DIR.'/api.response', $response);
|
|
||||||
|
|
||||||
|
|
||||||
/* [7] Decrement cyclic-hash so request has ran successfully
|
/* [7] Decrement cyclic-hash so request has ran successfully
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Decrement the hash */
|
/* (1) Decrement the hash */
|
||||||
|
|
|
@ -97,10 +97,13 @@
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
/* (2) Close request */
|
/* (2) Save response to file */
|
||||||
|
file_put_contents(TMP_DIR.'/api.response', $response);
|
||||||
|
|
||||||
|
/* (3) Close request */
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
/* (3) Return response as result */
|
/* (4) Return response as result */
|
||||||
if( $response === false ){
|
if( $response === false ){
|
||||||
slog("Request error", 'api:update','update');
|
slog("Request error", 'api:update','update');
|
||||||
return 127;
|
return 127;
|
||||||
|
@ -123,9 +126,6 @@
|
||||||
return 127;
|
return 127;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (3) Writes request to temporary pipe */
|
|
||||||
file_put_contents(TMP_DIR.'/api.response', $response);
|
|
||||||
|
|
||||||
|
|
||||||
/* [7] Decrement cyclic-hash so request has ran successfully
|
/* [7] Decrement cyclic-hash so request has ran successfully
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
|
|
Loading…
Reference in New Issue