Skip to content

Commit

Permalink
improve cloud request
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Oct 30, 2024
1 parent 1105afa commit 1035d48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/class/ajaxSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ public static function request($_path, $_data = null, $_type = 'GET') {
if ($_type == 'PUT') {
$request_http->setPut(json_encode($_data));
}
$return = json_decode($request_http->exec(30, 1), true);
$return = json_decode($request_http->exec(60, 3), true);
$return = is_json($return, $return);
if (isset($return['error'])) {
throw new \Exception(__('Erreur lors de la requete à Ajax System : ', __FILE__) . json_encode($return));
if (isset($return['error']) || isset($return['errors'])) {
sleep(rand(1,30));
$return = json_decode($request_http->exec(60, 3), true);
$return = is_json($return, $return);
}
if (isset($return['errors'])) {
if (isset($return['error']) || isset($return['errors'])) {
throw new \Exception(__('Erreur lors de la requete à Ajax System : ', __FILE__) . json_encode($return));
}
if (isset($return['body'])) {
Expand Down
2 changes: 2 additions & 0 deletions docs/fr_FR/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
>
>Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte
- Meilleur gestion des requetes au cloud

# 07/09/2024

- Version minimal du core 4.4
Expand Down

0 comments on commit 1035d48

Please sign in to comment.