-
Notifications
You must be signed in to change notification settings - Fork 0
BIG-168 Add retries for GoogleClient #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bec3aef
to
4537b7a
Compare
fb3ec64
to
522473e
Compare
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.
fakčí to, ten test bych nemazal, ale skipnul bych ho.
// try max 3 times | ||
'retries' => 3, | ||
// multiplicator of backoff time between runs. First = $initial_delay ; second $previousDelay * $factor | ||
'factor' => 1.1, |
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.
hmm mohlo to byt lineární, ale je tam ten jitter, který to može posunůt před tů minutu takže asi cajk.
$this->cleanTestProject(); | ||
} | ||
|
||
public function testCreateManyServiceACounts(): void |
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.
asi bych to dal mark as skip, je to zbytečné imho to pokaždé půšťat
upravil sem tu test metodu, nemá to žádné dobré řešení phpstan/phpstan-phpunit#52 |
Jira: https://keboola.atlassian.net/browse/BIG-168
Google_client
ma nejakou retry policy nastavenou. Kdyz se do nich prokliknes, tak je tam neco jako'clientConfig' => __DIR__ . '/../resources/cloud_billing_client_config.json',
, kde ten json obsahuje nejakou retry policy na ruzne metody. Do toho jsem nechtel uplne stouratGoogle_client
, ktery ho nema a resi nam to problem zakladani SAGoogle\Task\Runner
pridas na lajnu 187 neco takovehoecho time() . " executing #{$this->attempts} / {$this->maxAttempts} \n";
tak uvidis jak to pekne dela retryDEFAULT_RETRY_SETTINGS
mam tak nejak od oka. Vime, ze potrebujeme cekat cca 60s, takze delay je 60s, factor jsem dal jen 1.1 aby to moc exponencialne nerostlo a jitter taky malinkatej