use scheduler and fix tests

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2021-04-26 16:43:58 +02:00
parent 0b9eac3a81
commit 9dff1a9839
2 changed files with 14 additions and 6 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ export default async function createPlugin({
collator: new DefaultCatalogCollator(discovery),
});
indexBuilder.build();
const { scheduler } = await indexBuilder.build();
scheduler.start();
useHotCleanup(module, () => scheduler.stop());
return await createRouter({
engine: indexBuilder.getSearchEngine(),