This commit is contained in:
xds
2026-02-06 14:07:10 +03:00
parent 37e69088a1
commit cdb09e84fc
20 changed files with 470 additions and 30 deletions

View File

@@ -156,4 +156,15 @@ async def regenerate_thumbnails(dao: DAO = Depends(get_dao)):
logger.error(f"Failed to regenerate thumbnail for asset {asset.id}: {e}")
count += 1
return {"status": "completed", "processed": count, "updated": updated}
return {"status": "completed", "processed": count, "updated": updated}
@router.post("/migrate_to_minio")
async def migrate_to_minio(dao: DAO = Depends(get_dao)):
"""
Migrates assets from MongoDB to MinIO.
"""
logger.info("Starting migration to MinIO")
result = await dao.assets.migrate_to_minio()
logger.info(f"Migration result: {result}")
return result