amqp.exceptions.PreconditionFailed: Queue.declare: (406) PRECONDITION_FAILED - inequivalent arg 'x-expires' for queue '[email protected]' in vhost '/': received none but current is the value '10000' of type 'signedint' code example

Example 1: amqp.exceptions.PreconditionFailed: Queue.declare: (406) PRECONDITION_FAILED - inequivalent arg 'x-expires' for queue '[email protected]' in vhost '/': received none but current is the value '10000' of type 'signedint'

#Change the worker name
celery -A filevine_voice.tasks worker --loglevel=info -n worker_2

Example 2: amqp.exceptions.PreconditionFailed: Queue.declare: (406) PRECONDITION_FAILED - inequivalent arg 'x-expires' for queue '[email protected]' in vhost '/': received none but current is the value '10000' of type 'signedint'

## Add the below lines project __init__.py file

from __future__ import absolute_import, unicode_literals
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings')
import django
django.setup()

# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .tasks import app as celery_app

__all__ = ('celery_app',)