Skip to content

Commit 4d56450

Browse files
author
arthosofteq
authored
Merge pull request #418 from RedisInsight/bugfix/RI-2594-populate_defaults_first
try update statics only after default data populated
2 parents dc8a080 + 9991de1 commit 4d56450

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

redisinsight/api/src/modules/statics-management/providers/auto-updated-statics.provider.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
2424
*/
2525
onModuleInit() {
2626
// async operation to not wait for it and not block user in case when no internet connection
27-
Promise.all([
28-
this.initDefaults(),
29-
this.autoUpdate(),
30-
]);
27+
this.initDefaults().finally(this.autoUpdate.bind(this));
3128
}
3229

3330
/**
@@ -59,7 +56,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
5956
try {
6057
await this.updateStaticFiles();
6158
} catch (e) {
62-
this.logger.error('Unable to update auto static files', e);
59+
this.logger.warn('Unable to update auto static files', e);
6360
}
6461
}
6562
}
@@ -85,7 +82,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
8582
try {
8683
return await getFile(new URL(join(this.options.updateUrl, this.options.zip)).toString());
8784
} catch (e) {
88-
this.logger.error('Unable to get remote archive', e);
85+
this.logger.warn('Unable to get remote archive', e);
8986
return null;
9087
}
9188
}
@@ -109,7 +106,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
109106
try {
110107
return await getFile(new URL(join(this.options.updateUrl, this.options.buildInfo)).toString());
111108
} catch (e) {
112-
this.logger.error('Unable to get remote build info', e);
109+
this.logger.warn('Unable to get remote build info', e);
113110
return {};
114111
}
115112
}
@@ -124,7 +121,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
124121
'utf8',
125122
));
126123
} catch (e) {
127-
this.logger.error('Unable to get local checksum', e);
124+
this.logger.warn('Unable to get local checksum', e);
128125
return {};
129126
}
130127
}

0 commit comments

Comments
 (0)