Orphan cleanup - only log if entities were deleted
Signed-off-by: Jen Evans <jenevan@rei.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Change orphan cleanup task to debug log from info.
|
||||
Change orphan cleanup task to only log a message if it deleted entities.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user