Skip to content

Commit

Permalink
celery: fix revoke of tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Aug 14, 2024
1 parent 2fb185e commit 085bae5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cds/modules/flows/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from celery import shared_task
from celery.result import AsyncResult
from celery.utils.log import get_task_logger
from celery.worker.control import revoke
from flask import current_app

# from flask_iiif.utils import create_gif_from_frames
Expand Down Expand Up @@ -154,7 +153,7 @@ def on_success(self, retval, task_id, args, kwargs):
@staticmethod
def stop_task(celery_task_id):
"""Stop singular task."""
revoke(str(celery_task_id), terminate=True, signal="SIGKILL")
celery_app.control.revoke(str(celery_task_id), terminate=True, signal="SIGKILL")
result = AsyncResult(str(celery_task_id))
result.forget()

Expand Down

0 comments on commit 085bae5

Please sign in to comment.