Illustrate potential software catalog indexing.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.8",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.9.2",
|
||||
"@backstage/plugin-search-backend": "^0.1.1",
|
||||
"@backstage/plugin-search-indexer-backend": "^0.1.1",
|
||||
"@backstage/plugin-techdocs-backend": "^0.6.5",
|
||||
"@backstage/plugin-todo-backend": "^0.1.1",
|
||||
"@gitbeaker/node": "^28.0.2",
|
||||
|
||||
@@ -110,6 +110,8 @@ async function main() {
|
||||
console.log(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// @todo Start Search Refresh Loop Here?
|
||||
}
|
||||
|
||||
module.hot?.accept();
|
||||
|
||||
@@ -19,8 +19,10 @@ import {
|
||||
CatalogBuilder,
|
||||
createRouter,
|
||||
runPeriodically,
|
||||
SearchCollatorFactory,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
import { Router } from 'express';
|
||||
import { registerCollator } from '@backstage/plugin-search-indexer-backend';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
export default async function createPlugin(
|
||||
@@ -39,6 +41,12 @@ export default async function createPlugin(
|
||||
runPeriodically(() => higherOrderOperation.refreshAllLocations(), 100000),
|
||||
);
|
||||
|
||||
registerCollator({
|
||||
type: 'software-catalog',
|
||||
defaultRefreshIntervalSeconds: 600,
|
||||
collator: SearchCollatorFactory(entitiesCatalog),
|
||||
});
|
||||
|
||||
return await createRouter({
|
||||
entitiesCatalog,
|
||||
locationsCatalog,
|
||||
|
||||
Reference in New Issue
Block a user