File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,6 +359,6 @@ function cleanupOrphanBlobs(request) {
359359 const database = databases [ request . database ] ;
360360 if ( ! database ) throw new ClientError ( `Unknown database '${ request . database } '` ) ;
361361 // don't await, it will probably take hours
362- cleanupOrphans ( databases [ request . database ] ) ;
362+ cleanupOrphans ( databases [ request . database ] , request . database ) ;
363363 return { message : 'Orphaned blobs cleanup started, check logs for progress' } ;
364364}
Original file line number Diff line number Diff line change @@ -1132,7 +1132,7 @@ function polyfillBlob() {
11321132 * from the database, and if not, deletes them
11331133 * @param database
11341134 */
1135- export async function cleanupOrphans ( database : any ) {
1135+ export async function cleanupOrphans ( database : any , databaseName ?: string ) {
11361136 let store : LMDBStore ;
11371137 let auditStore : LMDBStore ;
11381138 let orphansDeleted = 0 ;
@@ -1152,6 +1152,7 @@ export async function cleanupOrphans(database: any) {
11521152 }
11531153 // remove all remaining paths are not referenced
11541154 await removePathsThatAreNotReferenced ( ) ;
1155+ logger . warn ?.( `Cleaned Orphan Blobs from ${ databaseName ?? 'database' } , deleted ${ orphansDeleted } blobs)` ) ;
11551156 return orphansDeleted ;
11561157 async function searchPath ( path : string ) {
11571158 try {
You can’t perform that action at this time.
0 commit comments