Celery tasks runs multiple times in a load balanced environment

22 Views Asked by At

I have a django project that deployed in a load balanced environment. there are some periodic celery tasks in my project, but they are executing twice at the time that they should execute. what is the problem?

this is my tasks:

from my_project.celery import app
from django_redis_task_lock import lock
import sentry_sdk

@app.task()
@lock('test_task6')
def test_task_6():
    sentry_sdk.capture_message(this task runs every 4 minutes starting at 17:46 PM  time = {timezone.now()}')

this is the schedule for this task

enter image description here

0

There are 0 best solutions below