skip to Main Content

Redis – How to change "transport" url in django celery config

I have django 3.2.7, celery 5.2.1, redis 3.5.3 I have next celery settings. (REDIS_PASSWORD) is env variable: CELERY_BROKER_URL = f'redis://:{REDIS_PASSWORD}@redis:6379/4' CELERY_BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} CELERY_RESULT_BACKEND = f'redis://:{REDIS_PASSWORD}@redis:6379/1' CELERY_ACCEPT_CONTENT = ['application/json'] But when I start my docker-compose app, it shows me…

VIEW QUESTION

Redis – How to run celery-beat task under decorator?

I have "locker" decorator: def lock_task(func): def wrapper(*args, **kwargs): if redis.set(func.__name__, 'lock', nx=True): try: result = func(*args, **kwargs) finally: redis.delete(func.__name__) return result or True else: return 'Skipped' return wrapper Also I have celery-task with my decorator: @celery_app.task @lock_task def test():…

VIEW QUESTION
Back To Top
Search