diff --git a/.github/workflows/sld-api-docker-image.yml b/.github/workflows/sld-api-docker-image.yml index 84579dc2..a144279d 100644 --- a/.github/workflows/sld-api-docker-image.yml +++ b/.github/workflows/sld-api-docker-image.yml @@ -26,10 +26,10 @@ jobs: - name: Build the Docker image with tag working-directory: ./sld-api-backend - run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-api:2.1.1 + run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-api:2.1.2 - name: Docker Push with tag - run: docker push ${{ secrets.DOCKER_USERNAME }}/sld-api:2.1.1 + run: docker push ${{ secrets.DOCKER_USERNAME }}/sld-api:2.1.2 - name: Build the Docker image working-directory: ./sld-api-backend diff --git a/sld-api-backend/api_v1/endpoints/tasks.py b/sld-api-backend/api_v1/endpoints/tasks.py index d8557c94..4309b8f8 100644 --- a/sld-api-backend/api_v1/endpoints/tasks.py +++ b/sld-api-backend/api_v1/endpoints/tasks.py @@ -2,7 +2,7 @@ from sqlalchemy.orm import Session from fastapi import APIRouter, Depends, HTTPException from celery.result import AsyncResult -from celery.task.control import revoke +from config.celery_config import celery_app from schemas import schemas from security import deps @@ -25,7 +25,7 @@ async def get_task_by_id( task_id: str, current_user: schemas.User = Depends(deps.get_current_active_user)): - result = revoke(task_id, terminate=True) + result = celery_app.control.revoke(task_id, terminate=True) return {"result": f'REVOKE {task_id}'} diff --git a/sld-api-backend/requirements.txt b/sld-api-backend/requirements.txt index 4d51e496..6fbfeecb 100644 --- a/sld-api-backend/requirements.txt +++ b/sld-api-backend/requirements.txt @@ -9,7 +9,7 @@ attrs==20.3.0 bcrypt==3.2.0 billiard==3.6.3.0 cached-property==1.5.2 -celery==4.4.7 +celery==5.2.2 certifi==2020.12.5 cffi==1.14.3 chardet==4.0.0