Fix tsc errors in search-backend-node

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-04-01 14:55:44 +02:00
committed by blam
parent 2538bf72e3
commit 1cd678be2b
2 changed files with 15 additions and 12 deletions
+14 -11
View File
@@ -134,18 +134,21 @@ export class IndexBuilder {
// Compose collator/decorators/indexer into a pipeline
return new Promise<void>(done => {
pipeline([collator, ...decorators, indexer], error => {
if (error) {
this.logger.error(
`Collating documents for ${type} failed: ${error}`,
);
} else {
this.logger.info(`Collating documents for ${type} succeeded`);
}
pipeline(
[collator, ...decorators, indexer],
(error: NodeJS.ErrnoException | null) => {
if (error) {
this.logger.error(
`Collating documents for ${type} failed: ${error}`,
);
} else {
this.logger.info(`Collating documents for ${type} succeeded`);
}
// Signal index pipeline completion!
done();
});
// Signal index pipeline completion!
done();
},
);
});
}, this.collators[type].refreshInterval * 1000);
});
@@ -129,7 +129,7 @@ export class TestPipeline {
}
pipes.push(this.indexer!);
pipeline(pipes, error => {
pipeline(pipes, (error: NodeJS.ErrnoException | null) => {
done({
error,
documents,