-
Notifications
You must be signed in to change notification settings - Fork 26
Add a retry feature for synchronous requests #16
Conversation
f1992fd
to
8e0c453
Compare
Can you report option in the Configuration reference in README ? |
Done ;-) |
64a89e0
to
9320080
Compare
// Reset the current session to retry the command | ||
$this->resetSession(); | ||
$retry--; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je suis un peu un puriste du pas de else. Donc tu pourrais modifier comme cela
if($retry > 0) {
$this->resetSession();
$retry--;
continue;
}
throw $e;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai justement essayé de ne pas faire de break / continue dans cette boucle (sinon j'aurais fait un while(true) ... break; continue... ;-))
Il y a d'autres puristes dans le coin qui vont dire qu'ils n'aiment pas les break et les continues ;-)
En plus on peut vouloir ajouter des choses du code après le catch ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
👍 |
👍 Squash commits then I merge it |
9320080
to
9b1fe65
Compare
Squashed ;-) |
Add a retry feature for synchronous requests
To add a retry feature for the synchronous requests.
I have no idea how to add a retry for asynchronous requests.