From 11bf70c46fe53489d92b7632421d84bf59ddce8d Mon Sep 17 00:00:00 2001 From: Aaron Wu <12989649+Aaron-Wu1@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:37:33 -0700 Subject: [PATCH] added results backend --- .github/workflows/deploy_dev.yml | 2 ++ backend/api/__init__.py | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 36d199f1..d4d4a509 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -139,6 +139,7 @@ jobs: --build-arg OAUTH_REDIRECT_URI="${{ secrets.OAUTH_REDIRECT_URI }}" \ --build-arg AWS_SQS_URL="${{ secrets.AWS_SQS_URL }}" \ --build-arg MESSAGE_BROKER="aws_sqs" \ + --build-arg CELERY_RESULT_BACKEND="${{ secrets.CELERY_RESULT_BACKEND }}" \ --target production \ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -218,6 +219,7 @@ jobs: --build-arg OAUTH_REDIRECT_URI="${{ secrets.OAUTH_REDIRECT_URI }}" \ --build-arg AWS_SQS_URL="${{ secrets.AWS_SQS_URL }}" \ --build-arg MESSAGE_BROKER="aws_sqs" \ + --build-arg CELERY_RESULT_BACKEND="${{ secrets.CELERY_RESULT_BACKEND }}" \ --target prodworker \ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG diff --git a/backend/api/__init__.py b/backend/api/__init__.py index 6ae5d3d4..61988b00 100644 --- a/backend/api/__init__.py +++ b/backend/api/__init__.py @@ -71,6 +71,7 @@ def create_app(debug: bool = False) -> Flask: app.config.from_mapping( CELERY=dict( broker_url="sqs://", + result_backend=os.getenv("CELERY_RESULT_BACKEND"), task_ignore_result=True, task_default_queue = "dirtviz-task-queue", broker_transport_options={