keep event stream alive even if its taking a while

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2023-02-01 15:05:48 +00:00
parent 422e6b050c
commit 6f097023fc
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Keep the tech docs sync event stream alive even if it is taking a while to build.
@@ -128,7 +128,13 @@ export class DocsSynchronizer {
cache: this.cache,
});
const interval = setInterval(() => {
taskLogger.info(
'The docs building process is taking a little bit longer to process this entity. Please bear with us.',
);
}, 10000);
const updated = await this.buildLimiter(() => docsBuilder.build());
clearInterval(interval);
if (!updated) {
finish({ updated: false });