Skip to content

Commit

Permalink
fix: process_all_imagery for a project
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Jan 3, 2025
1 parent a5396f6 commit e9088ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ async def process_imagery(

@router.post("/process_all_imagery/{project_id}/", tags=["Image Processing"])
async def process_all_imagery(
project_id: uuid.UUID,
project: Annotated[
project_schemas.DbProject, Depends(project_deps.get_project_by_id)
],
Expand All @@ -474,12 +473,12 @@ async def process_all_imagery(
with open(gcp_file_path, "wb") as f:
f.write(await gcp_file.read())

s3_path = f"dtm-data/projects/{project_id}/gcp/gcp_list.txt"
s3_path = f"dtm-data/projects/{project.id}/gcp/gcp_list.txt"
add_file_to_bucket(settings.S3_BUCKET_NAME, gcp_file_path, s3_path)

tasks = await project_logic.get_all_tasks_for_project(project.id, db)
background_tasks.add_task(
project_logic.process_all_drone_images, project_id, tasks, user_id, db
project_logic.process_all_drone_images, project.id, tasks, user_id, db
)
return {"message": f"Processing started for {len(tasks)} tasks."}

Expand Down

0 comments on commit e9088ff

Please sign in to comment.