Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 5, 2024
1 parent 19d956f commit 1fa5675
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/backend/app/jaxa/upload_dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pathlib import Path

from fastapi import UploadFile
from psycopg import AsyncConnection
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings

Expand Down Expand Up @@ -45,12 +44,12 @@ async def upload_dem_file_s3_sync(tif_file_path: str, project_id):
dem = UploadFile(file=file_obj, filename="dem.tif")

dem_url = await project_logic.upload_file_to_s3(project_id, dem, "dem.tif")

pool = await database.get_db_connection_pool()
async with pool as pool_instance:
async with pool_instance.connection() as conn:
await project_logic.update_url(conn,project_id,dem_url)
await project_logic.update_url(conn, project_id, dem_url)

os.remove(tif_file_path)
except Exception:
pass
Expand Down

0 comments on commit 1fa5675

Please sign in to comment.