Skip to content

Commit 82114d0

Browse files
author
Илья
committed
Remove recreate client on YDB_UNAVAILABLE
1 parent c7c6611 commit 82114d0

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/Traits/RequestTrait.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,6 @@ protected function processResponse($service, $method, $response, $resultClass)
236236
$this->resetLastRequest();
237237

238238
return $result;
239-
} elseif ($statusCode == StatusCode::UNAVAILABLE){
240-
if ($this->ydb->needDiscovery()){
241-
try{
242-
$this->ydb->discover();
243-
}catch (\Exception $e){}
244-
}
245-
$endpoint = $this->ydb->endpoint();
246-
if ($this->ydb->needDiscovery() && count($this->ydb->cluster()->all()) > 0){
247-
$endpoint = $this->ydb->cluster()->all()[array_rand($this->ydb->cluster()->all())]->endpoint();
248-
}
249-
$this->client = new $this->client($endpoint,[
250-
'credentials' => $this->ydb->iam()->getCredentials()
251-
]);
252239
}
253240
$statusName = StatusCode::name($statusCode);
254241

0 commit comments

Comments
 (0)