Skip to content

Commit

Permalink
Merge branch 'main' into fix-bytes-type-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarowolfx authored Oct 2, 2024
2 parents d928b84 + 629f4c4 commit 0ba3edb
Show file tree
Hide file tree
Showing 8 changed files with 2,280 additions and 792 deletions.
2 changes: 2 additions & 0 deletions gax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"mocha": "^9.0.0",
"ncp": "^2.0.0",
"null-loader": "^4.0.0",
"pdfmake": "0.2.12",
"protobufjs-cli": "1.1.3",
"proxyquire": "^2.0.1",
"pumpify": "^2.0.0",
Expand All @@ -63,6 +64,7 @@
"webpack": "^4.0.0",
"webpack-cli": "^4.0.0"
},

"scripts": {
"docs": "compodoc src/",
"pretest": "npm run prepare",
Expand Down
9 changes: 9 additions & 0 deletions gax/src/gax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@ export function convertRetryOptions(
// this is in seconds and needs to be converted to milliseconds and the totalTimeoutMillis parameter
if (options.retryRequestOptions.totalTimeout !== undefined) {
totalTimeoutMillis = options.retryRequestOptions.totalTimeout * 1000;
} else {
if (options.maxRetries === undefined) {
totalTimeoutMillis = 30000;
warn(
'retry_request_options_no_max_retries_timeout',
'Neither maxRetries nor totalTimeout were passed. Defaulting to totalTimeout of 30000ms.',
'MissingParameterWarning'
);
}
}

// for the variables the user wants to override, override in the backoff settings object we made
Expand Down
Loading

0 comments on commit 0ba3edb

Please sign in to comment.