Fixed orphaned media flush running on every startup.
This commit is contained in:
@@ -1056,6 +1056,11 @@ async function deleteS3Objects(allMedia) {
|
||||
}
|
||||
|
||||
async function flushOrphanedMedia(stage = 1) {
|
||||
if (!config.media.flushOrphaned) {
|
||||
logger.verbose('Orphaned media flush skipped, disabled in config');
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info(`Flushing orphaned media, stage ${stage}`);
|
||||
|
||||
const orphanedMedia = await knex('media')
|
||||
|
||||
Reference in New Issue
Block a user