Orphan cleanup - only log if entities were deleted

Signed-off-by: Jen Evans <jenevan@rei.com>
This commit is contained in:
Jen Evans
2023-05-12 10:51:38 -07:00
parent ea108a2510
commit 3bd2518f1f
2 changed files with 4 additions and 2 deletions
@@ -317,7 +317,9 @@ export class DefaultCatalogProcessingEngine implements CatalogProcessingEngine {
try {
await this.processingDatabase.transaction(async tx => {
const n = await this.processingDatabase.deleteOrphanedEntities(tx);
this.logger.debug(`Deleted ${n} orphaned entities`);
if (n > 0) {
this.logger.info(`Deleted ${n} orphaned entities`);
}
});
} catch (error) {
this.logger.warn(`Failed to delete orphaned entities`, error);