Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reslove project completed status after images processing #301

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
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
description: trims trailing whitespace.
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
description: ensures that a file is either empty, or ends with one newline.
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
Expand All @@ -40,15 +40,15 @@ 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
description: ensures that (non-binary) files with a shebang are executable.
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
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/backend/app/projects/image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading