From a4fc5be7cdc26a5e80fe6886d42940709d8f8b51 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:47:45 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.8...v0.6.9) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c51c413..e1fe5a70 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace name: trim trailing whitespace @@ -8,7 +8,7 @@ repos: entry: trailing-whitespace-fixer language: python types: [text] - stages: [commit, push, manual] + stages: [pre-commit, pre-push, manual] - id: end-of-file-fixer name: fix end of files @@ -16,7 +16,7 @@ repos: entry: end-of-file-fixer language: python types: [text] - stages: [commit, push, manual] + stages: [pre-commit, pre-push, manual] - id: detect-aws-credentials name: detect aws credentials @@ -40,7 +40,7 @@ repos: entry: check-executables-have-shebangs language: python types: [text, executable] - stages: [commit, push, manual] + stages: [pre-commit, pre-push, manual] - id: check-shebang-scripts-are-executable name: check that scripts with shebangs are executable @@ -48,7 +48,7 @@ repos: entry: check-shebang-scripts-are-executable language: python types: [text] - stages: [commit, push, manual] + stages: [pre-commit, pre-push, manual] - id: check-json name: check json @@ -74,7 +74,7 @@ repos: description: prevents giant files from being committed. entry: check-added-large-files language: python - stages: [commit, push, manual] + stages: [pre-commit, pre-push, manual] args: ["--maxkb=10240"] # Versioning: Commit messages & changelog @@ -87,7 +87,7 @@ repos: # Lint / autoformat: Python code - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: "v0.6.8" + rev: "v0.6.9" hooks: # Run the linter - id: ruff From 6adf0de0228e99e307b6675e2d5efa84f8b492a1 Mon Sep 17 00:00:00 2001 From: Pradip-p Date: Fri, 18 Oct 2024 13:29:27 +0545 Subject: [PATCH 2/2] fix: reslove project completed status after images processing --- src/backend/app/projects/image_processing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/app/projects/image_processing.py b/src/backend/app/projects/image_processing.py index c42bd881..6549d999 100644 --- a/src/backend/app/projects/image_processing.py +++ b/src/backend/app/projects/image_processing.py @@ -191,7 +191,7 @@ def process_images_from_s3(self, bucket_name, name=None, options=[], webhook=Non pass -def download_and_upload_assets_from_odm_to_s3( +async def download_and_upload_assets_from_odm_to_s3( db: Connection, node_odm_url: str, task_id: str, @@ -231,8 +231,7 @@ def download_and_upload_assets_from_odm_to_s3( log.info(f"Assets for task {task_id} successfully uploaded to S3.") # Update background task status to COMPLETED - update_task_status_sync = async_to_sync(task_logic.update_task_state) - update_task_status_sync( + await task_logic.update_task_state( db, dtm_project_id, dtm_task_id,