Skip to content

Commit

Permalink
increase retry on table exists BQ
Browse files Browse the repository at this point in the history
  • Loading branch information
zajca committed Dec 16, 2024
1 parent 5fb4387 commit 6f0edf1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Keboola\TableBackendUtils\Table\Bigquery\BigqueryTableReflection;
use Keboola\TableBackendUtils\View\ViewReflectionInterface;
use PDO;
use Retry\Policy\SimpleRetryPolicy;
use Retry\RetryProxy;

class BigqueryWorkspaceBackend implements WorkspaceBackend
Expand Down Expand Up @@ -219,7 +220,7 @@ protected function isTableExists(string $schema, string $table): bool
$dataset = $this->bqClient->dataset($schema);
$table = $dataset->table($table);

$exists = (new RetryProxy())->call(function () use ($table) {
$exists = (new RetryProxy(new SimpleRetryPolicy(10)))->call(function () use ($table) {
return $table->exists();
});
assert(is_bool($exists));
Expand Down

0 comments on commit 6f0edf1

Please sign in to comment.