TechInsightsBackend: Added 'scheduler' to code examples

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
This commit is contained in:
Niklas Aronsson
2022-06-21 06:59:44 +02:00
parent fe391c8bb4
commit 2ef58ab539
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-insights-backend': patch
---
TechInsightsBackend: Added missing 'scheduler' to code examples
+3
View File
@@ -106,6 +106,7 @@ const builder = buildTechInsightsContext({
database: env.database,
discovery: env.discovery,
tokenManager: env.tokenManager,
scheduler: env.scheduler,
- factRetrievers: [],
+ factRetrievers: [myFactRetrieverRegistration],
});
@@ -122,6 +123,7 @@ const builder = buildTechInsightsContext({
database: env.database,
discovery: env.discovery,
tokenManager: env.tokenManager,
scheduler: env.scheduler,
- factRetrievers: [],
+ factRetrievers: process.env.MAIN_FACT_RETRIEVER_INSTANCE ? [myFactRetrieverRegistration] : [],
});
@@ -281,6 +283,7 @@ export default async function createPlugin(
database: env.database,
discovery: env.discovery,
tokenManager: env.tokenManager,
scheduler: env.scheduler,
factRetrievers: [
createFactRetrieverRegistration({
cadence: '0 */6 * * *', // Run every 6 hours - https://crontab.guru/#0_*/6_*_*_*