Updates post review by @Rugvip:
1. Updated reloadIntervalSeconds example to 10 minutes 2. Updated config load error message 3. Fixed vocab error Signed-off-by: Praveen Ranjan Keshri <prkeshri@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
Fixed bug in backend-common to allow passing of remote option in order to enable passing remote url in --config option. The remote option should be passed along with reloadIntervalSeconds from packages/backend/src/index.ts (Updated the file as well)
|
||||
|
||||
These changes are needed in `packages/backend/src/index.ts` if remote urls are desired to be passed in --config option and read and watch remote files for config.
|
||||
These changes are needed in `packages/backend/src/index.ts` if remote URLs are desired to be passed in --config option and read and watch remote files for config.
|
||||
|
||||
```diff
|
||||
@@ -86,7 +86,11 @@ async function main() {
|
||||
@@ -12,7 +12,7 @@ These changes are needed in `packages/backend/src/index.ts` if remote urls are d
|
||||
argv: process.argv,
|
||||
logger,
|
||||
+ remote: {
|
||||
+ reloadIntervalSeconds: 60 * 60 * 12 // Check remote config changes every 12 hours. Change to your desired interval in seconds
|
||||
+ reloadIntervalSeconds: 60 * 10 // Check remote config changes every 10 minutes. Change to your desired interval in seconds
|
||||
+ }
|
||||
});
|
||||
+
|
||||
|
||||
@@ -129,7 +129,7 @@ export async function loadConfig(
|
||||
if (remote === undefined) {
|
||||
if (configUrls.length > 0) {
|
||||
throw new Error(
|
||||
`Please make sure you are passing the remote option when loading the configuration. See https://backstage.io/docs/conf/writing#configuration-files for detailed info.`,
|
||||
`Please make sure you are passing the remote option when loading remote configurations. See https://backstage.io/docs/conf/writing#configuration-files for detailed info.`,
|
||||
);
|
||||
}
|
||||
} else if (remote.reloadIntervalSeconds <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user