skip to Main Content

Redis – task receive but doesn't excute

I'm learning Django. recently I tried to use celery. the problem that I'm facing with it is tasks are receiving but they don't execute. settings.py: # Celery application definition CELERY_BROKER_URL = 'redis://localhost:6379' CELERY_RESULT_BACKEND = 'redis://localhost:6379' CELERY_ACCEPT_CONTENT = ['application/json'] CELERY_TASK_SERIALIZER =…

VIEW QUESTION

Redis – celery-beat KeyError: 'scheduler'

I am trying to run a periodic celery task using celery beat and docker for my Flask application. However when I run the container I get the below error: Removing corrupted schedule file 'celerybeat-schedule': error(22, 'Invalid argument') Traceback (most recent…

VIEW QUESTION

Redis – celery .delay freezes for this task but runs for others

I am trying to send notifications using celery. @shared_task(name='send_notifis') def send_notifs(device_ids, title, message): from pills_reminder.models import UserNotifications, UserDevice devices = UserDevice.objects.filter(id__in=device_ids) print(devices) device_tokens = [] for device in devices: UserNotifications.objects.create( uid=device.device_id, title=title, message=message, ) print(UserNotifications) device_tokens.append(device.registration_token) if len(device_tokens) > 1:…

VIEW QUESTION
Back To Top
Search