Skip to content

Commit d21e08d

Browse files
fix: remove retryDelay option (#203)
1 parent 5cdeef2 commit d21e08d

File tree

8 files changed

+8
-12
lines changed

8 files changed

+8
-12
lines changed

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ gaxios.request({url: '/data'}).then(...);
107107
// The number of retries already attempted.
108108
currentRetryAttempt?: number;
109109

110-
// The amount of time to initially delay the retry. Defaults to 100.
111-
retryDelay?: number;
112-
113110
// The HTTP Methods that will be automatically retried.
114111
// Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
115112
httpMethodsToRetry?: string[];

src/common.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at
@@ -114,6 +114,7 @@ export interface RetryConfig {
114114

115115
/**
116116
* The amount of time to initially delay the retry. Defaults to 100.
117+
* @deprecated
117118
*/
118119
retryDelay?: number;
119120

src/gaxios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at

src/retry.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at
@@ -22,7 +22,6 @@ export async function getRetryConfig(err: GaxiosError) {
2222
config.currentRetryAttempt = config.currentRetryAttempt || 0;
2323
config.retry =
2424
config.retry === undefined || config.retry === null ? 3 : config.retry;
25-
config.retryDelay = config.retryDelay || 100;
2625
config.httpMethodsToRetry = config.httpMethodsToRetry || [
2726
'GET',
2827
'HEAD',

test/test.getch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at

test/test.index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at

test/test.retry.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Google, LLC.
1+
// Copyright 2018 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at
@@ -50,7 +50,6 @@ describe('🛸 retry & exponential backoff', () => {
5050
assert.strictEqual(config!.currentRetryAttempt, 3);
5151
assert.strictEqual(config!.retry, 3);
5252
assert.strictEqual(config!.noResponseRetries, 2);
53-
assert.strictEqual(config!.retryDelay, 100);
5453
const expectedMethods = ['GET', 'HEAD', 'PUT', 'OPTIONS', 'DELETE'];
5554
for (const method of config!.httpMethodsToRetry!) {
5655
assert(expectedMethods.indexOf(method) > -1);

0 commit comments

Comments
 (0)