Trying to fix a logging bug?

This commit is contained in:
Scott Idem
2023-06-13 11:55:56 -04:00
parent fdefe0e48f
commit b2683e71c5
2 changed files with 292 additions and 296 deletions

View File

@@ -3,7 +3,7 @@ from fastapi import APIRouter, Body, Depends, File, Form, Header, HTTPException,
from fastapi.responses import FileResponse
from pydantic import BaseModel, EmailStr, Field
from typing import Dict, List, Optional, Set, Union
# from pdf2image import convert_from_path
from pdf2image import convert_from_path
from app.lib_general import log, logging, common_route_params, Common_Route_Params, common_route_params_min, Common_Route_Params_Min
from app.config import settings
@@ -807,13 +807,7 @@ async def convert_file(
# 2K 2048x1080
# HD 1920x1080
# Save as webp with 3840 size and 90 lossy quality works well for posters. Better than in the past with PNG. Higher resolution and smaller file size! -2023-05-04
return mk_resp(data=None, status_code=500, response=commons.response)
# images = convert_from_path(full_file_path, size=(3840, None)) # 2160 works well
images = [] # delete this
images = convert_from_path(full_file_path, size=(3840, None)) # 2160 works well
for image in images:
# *** Part 1: *** Convert the file and save the file to tmp and then save the hashed file to hosted_files directory.