vitorfs / colossus

Self-hosted email marketing solution
https://colossus.readthedocs.io
MIT License
503 stars 128 forks source link

Need help with celery/rabbitmq configuration #27

Open abhas opened 5 years ago

abhas commented 5 years ago

I recently setup colossus. And the main web app works great! Thanks for building this.

I installed and ran rabbitmq as instructed but for some reason I am not able to get celery to talk to rabbitmq to schedule and send emails. Any documentation or links on how I could setup this up?

Thanks a lot!

vitorfs commented 5 years ago

Hi @abhas

Basically I have RabbitMQ running on the server, and the scripts that I'm using in production right now are those:

Worker: https://github.com/vitorfs/colossus/blob/master/etc/colossus_celery_worker_supervisord.conf Beat/Scheduler: https://github.com/vitorfs/colossus/blob/master/etc/colossus_celery_beat_supervisord.conf

Those are supervisor configuration files (http://supervisord.org)

This is what I'm using in production, but during development I just run the commands in a terminal (one for each):

celery beat -A colossus

And

celery worker -A colossus

For those to work you need to be running RabbitMQ server:

rabbitmq-server

Usually that's what I do

abhas commented 5 years ago

Hi @vitorfs,

I tried to run celery in the manner you've detailed above. But colossus does not even attempt to talk to celery. And hence, none of the mails pass through. When I checked out the configuration for celery, it all seemed to be there by default. Do I need to do any configuration for colossus to talk to celery? Is there a way I can enable more debug logs?

I'm sorry I am not familiar enough with Celery myself (or even much Python). And hence these questions.

Once I get it working, I will build a docker-compose file to run all of these via docker. Hope you saw the pull request that contains the Dockerfile.

Cheers, Abhas.

abhas commented 5 years ago

Hi @vitorfs --- if you can provide some quick suggestions on what to debug, It would really be helpful. I can try to use colossus.

Thanks a lot...