Celery with SQS

39 views
Skip to first unread message

Rogerio Carrasqueira

unread,
Oct 26, 2019, 2:50:46 PM10/26/19
to django...@googlegroups.com
Hello All!

I'm using Celery 3.1 with Django 1.4.22 and I want to move from
RabbitMQ to SQS. I've setup the celery and all scheduled tasks are
running as well. But when I have to use the method add_consumer, the
jobs are not consumed by the worker and no response from then. See
what I'm doing:

>>> from celery import current_app as app

>>> app.control.add_consumer('production-email-campaign-105258', reply=True, destination=['celery@worker_email.w13.ip-10-0-1-82'])

[]

>>> app.control.add_consumer('production-email-campaign-105258', reply=True, destination=['celery@worker_email.ip-10-0-1-82'])

[]

>>> app.control.add_consumer('production-email-campaign-105258', reply=True, destination=['celery_worker_email-ip-10-0-1-82-celery-pidbox'])

[]

>>> app.control.add_consumer('production-email-campaign-105258', reply=True)

[]

>>> app.control.add_consumer('production-email-campaign-105258', reply=True, destination=['celery_worker_email-ip-10-0-1-82'])

[]

>>>


I did not get any response from the celery and jobs to remain to wait
for consumer. I would like to know if there any clue to make celery
working good with SQS and dynamic queues, as example
'production-email-campaign-XXX' that is created on the fly.


Thanks



Rogério Carrasqueira

Jason

unread,
Oct 26, 2019, 3:39:30 PM10/26/19
to Django users
both those versions are severely out of date, so I would first suggest to update.  current version of celery is 4.3, and django is 2.2.  If you have reasons to move from rabbit to SQS, why not update everything else while you're at it?


Rogerio Carrasqueira

unread,
Oct 26, 2019, 4:33:23 PM10/26/19
to django...@googlegroups.com
Hello Jason!

Thanks for your reply, it is not so easy to move from 1.4.22 to 2.2,
it a big leap. I can upgrade the celery to 4.3, but I don't know if it
will work well with Django 1.4.22. Do you have a clue about what could
be this issue?

Thanks


Rogério Carrasqueira




Em sáb, 26 de out de 2019 às 16:40, Jason <jjohn...@gmail.com> escreveu:
>
> both those versions are severely out of date, so I would first suggest to update. current version of celery is 4.3, and django is 2.2. If you have reasons to move from rabbit to SQS, why not update everything else while you're at it?
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/419fedc2-a953-4a2f-a24e-560fbf3bd9ad%40googlegroups.com.

Integr@te System

unread,
Oct 27, 2019, 3:17:45 AM10/27/19
to django...@googlegroups.com
Hi issuer,

please check:

Warning

If you import models directly rather than using the historical models, your migrations may work initially but will fail in the future when you try to re-run old migrations (commonly, when you set up a new installation and run through all the migrations to set up the database).

This means that historical model problems may not be immediately obvious. If you run into this kind of failure, it’s OK to edit the migration to use the historical models rather than direct imports and commit those changes.

<u>source: </u> https://docs.djangoproject.com/en/2.2/topics/migrations/


Jason

unread,
Oct 27, 2019, 9:42:01 AM10/27/19
to Django users
celery 4.x is for django 18 or newer

Thing is, there's been a lot of changes in django since 1.4, which last recieved a minor update in 2015.  I get updating is not as easy as waving a magic wand, but you're using very out of date versions, so any investigation has to keep that in mind  That has the consequence of significantly limiting the amount of help you can get because you're relying on people dredging up 4 years or so of memories.

Unfortunately, I don't know SQS.  If this is working fine with Rabbit as your broker, why the move to SQS while keeping all other dependencies the same?

On Saturday, October 26, 2019 at 4:33:23 PM UTC-4, Rogério Carrasqueira wrote:
Hello Jason!

Thanks for your reply, it is not so easy to move from 1.4.22 to 2.2,
it a big leap. I can upgrade the celery to 4.3, but I don't know if it
will work well with Django 1.4.22. Do you have a clue about what could
be this issue?

Thanks


Rogério Carrasqueira




Em sáb, 26 de out de 2019 às 16:40, Jason <jjohn...@gmail.com> escreveu:
>
> both those versions are severely out of date, so I would first suggest to update.  current version of celery is 4.3, and django is 2.2.  If you have reasons to move from rabbit to SQS, why not update everything else while you're at it?
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages