# Django + Celery Task receive issue.

**URL:** <https://forum.djangoproject.com/t/django-celery-task-receive-issue/32474>\
**Category:** Async/Channels\
**Created:** [June 26, 2024, 12:05pm UTC](https://forum.djangoproject.com/t/django-celery-task-receive-issue/32474 "2024-06-26T12:05:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbose7375](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rbose7375/32/22233_2.png) [@rbose7375](https://forum.djangoproject.com/u/rbose7375)\
**Post date:** [June 26, 2024, 12:05pm UTC](https://forum.djangoproject.com/t/django-celery-task-receive-issue/32474/1 "2024-06-26T12:05:30Z")

</div>

Hello,

I have an issue with my celery.

this is my celery configuration.

```auto
import os
from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'prune.settings')

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

```

this is my celery task

```auto
@shared_task
def delete_delivery_instance(instance_id):
    try:
        instance = DeliveryBoyLocation.objects.get(id =instance_id)
        instance.delete()
        return True
    except Exception as e:
        print(e,"delete_delivery_instance_error")
        return False

```

and this is for sending tasks to celery, run in 5 min.

```auto
delete_delivery_instance.apply_async(args=[deliverylocation.id], countdown=300)

```

using this command to run celery in my linux services

```auto
celery -A prune worker --loglevel=info --pool=threads -c 4 

```

I tried so many run celery commands but still faced issues.

the issue is that I sending 10 tasks to the celery but celery has received only 3-4 task  
sometimes it takes 6-7 but celery does not take each task.

is there any configuration or setting that I miss to implement please guide me.

I’m using rabbitmq server as a message queue

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [June 26, 2024, 12:24pm UTC](https://forum.djangoproject.com/t/django-celery-task-receive-issue/32474/2 "2024-06-26T12:24:25Z")

</div>

> [@rbose7375](#):
>
> the issue is that I sending 10 tasks to the celery but celery has received only 3-4 task  
> sometimes it takes 6-7 but celery does not take each task.

Please be more detailed and specific with this description.

Are you saying that your code is calling `delete_delivery_instance.apply_async(...)` 10 times? How have you verified that?

Then is celery showing that it has received 10 messages? (or not) How are you verifying this?

Are you getting any error messages in either your celery logs or your application’s logs?
