Celery duplicating tasks

Ok thanks, Ken.

So it seems that its not pulling in the settings for some reason.

celery.py

import os

from celery import Celery
from celery.schedules import crontab

# Set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app_backend.settings')

app = Celery('app_backend')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()

celeryconfig.py
empty

init.py

from .celery import app as celery_app

__all__ = ('celery_app',)

settings.py

CELERY_BROKER_URL = 'redis://:###t:6379/__redisinstance__',
CELERY_IMPORT = ('backend.tasks',)
CELERY_TIMEZONE = 'UTC'
CELERY_RESULT_BACKEND = 'redis://:A####t:6379/__redisbackendinstance__',

Can you see anything wrong with any of that?

Thanks

A couple things I’d have questions about, but am not entirely sure they’re wrong:

CELERY_BROKER_URL = 'redis://:###t:6379/__redisinstance__',
                             ^ Extra colon here?
   I don't know where this is defined   ^^^^^^^^^^^^^^^^^ 
Comma on the end of the string, defining this as a tuple  ^

CELERY_IMPORT = ('backend.tasks',)

The setting is imports, not import, so I think it should be CELERY_IMPORTS.

I’m using Azure for Redis. It doesn’t have a username just an access token. so the first : is just empty. It was working before so I assume that will continue to work?

i run the build through a pipeline that replaces __redisinstance__ with the value for the environment.

Well spotted on the typo and the , tuple. I’ve fixed those now and re-deploy. Hopefully, this is the issue.