Skip to content

Commit 22ca504

Browse files
committed
fix: apollo config observer polling retry count
1 parent b533e5f commit 22ca504

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"dependencies": {
6666
"@nestjs/common": "^8.4.7",
6767
"@vodyani/class-decorator": "^8.2.3",
68-
"@vodyani/core": "^8.9.7",
68+
"@vodyani/core": "^8.9.8",
6969
"@vodyani/http-client": "^1.2.0",
7070
"@vodyani/utils": "^8.7.1",
7171
"js-yaml": "^4.1.0"

src/struct/apollo-config-observer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class ApolloConfigObserver implements IObserver {
4343
@This
4444
public async polling(retry?: number, delay?: number) {
4545
let errorCount = 0;
46-
const retryCount = toNumber(retry, 4);
47-
const delayCount = toNumber(delay, 1000);
46+
const retryCount = toNumber(retry, 10);
47+
const delayCount = toNumber(delay, 20000);
4848

4949
while (this.infos.size > 0) {
5050
try {

test/apollo-client.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Loader implements IConfigLoader {
2929

3030
const clientOptions = {
3131
configServerUrl: 'http://106.54.227.205:8080',
32-
secret: '6984ceaa48b2405b8606631c0a42e7b4',
32+
secret: '825b411eb95442c7bd0f696077cef72e',
3333
appId: 'vodyani-apollo-config',
3434
};
3535

@@ -38,7 +38,7 @@ const thirdPartyOptions = {
3838
operator: 'apollo',
3939
appId: 'vodyani-apollo-config',
4040
portalServerUrl: 'http://106.54.227.205',
41-
token: 'fbf1302cd6b2417ebf4511555facbb2371a0fc40',
41+
token: '0dd6ada2ae97abb2bb6cb5c9818141a6c3faf0c3',
4242
};
4343

4444
const thirdPartyClient = new ApolloThirdPartyHttpClient(thirdPartyOptions);

test/http-client.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99

1010
const options: ApolloHttpClientOptions = {
1111
configServerUrl: 'http://106.54.227.205:8080',
12-
secret: '6984ceaa48b2405b8606631c0a42e7b4',
12+
secret: '825b411eb95442c7bd0f696077cef72e',
1313
appId: 'vodyani-apollo-config',
1414
};
1515

@@ -18,7 +18,7 @@ const thirdPartyOptions: ApolloThirdPartyHttpClientOptions = {
1818
operator: 'apollo',
1919
appId: 'vodyani-apollo-config',
2020
portalServerUrl: 'http://106.54.227.205',
21-
token: 'fbf1302cd6b2417ebf4511555facbb2371a0fc40',
21+
token: '0dd6ada2ae97abb2bb6cb5c9818141a6c3faf0c3',
2222
};
2323

2424
const thirdPartyClient = new ApolloThirdPartyHttpClient(thirdPartyOptions);

0 commit comments

Comments
 (0)