Deploying a Celery Project

I'm attempting a proof of concept for sending emails using celery on railway.app. If I can show this working then we will integrate this into our actual project. I found a simple github and how to and set it up locally with it pointing to redis on railway.app (since you guys are nice enough to provide quick spin up on it). The instructions I have tell me do the following three commands in individual terminals. It works and starts sending emails with a scheduled task. Note, this is just sending email reports for users of our app. It's not a mass emailing system. python manage.py runserver celery -A main worker --pool=solo -l info celery -A main beat -l INFO So I have gathered that I need to setup my Procfile correctly for this to work on railway.app. My Procfile looks like this: release: python manage.py migrate web: gunicorn main.wsgi --log-file - worker: celery -A main worker --pool=solo -l info I was trying to find documentation on Procfile and how it works, but find myself resorting to trying examples. How would I do the last terminal service 'celery -A main beat -l INFO`? Do I just make another line and tag it with worker: in the front? Is that a label or a pre-defined tag? Any help would be appreciated!
15 Replies
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
⚠️ experimental feature
terminatedproccess
I don't know where to find the project id, but this hex number is next to the project name.. 9bddd44
angelo
angelo2y ago
Can you drop me a link to your project? that way I can jump in and look at it
terminatedproccess
My project id is 894893d5-5281-4ff7-85b1-5eab800fcda1
angelo
angelo2y ago
Cool: one thing off the bat is you can't send emails off Railway because of GCP port stuff (our provider) but going to dig in
terminatedproccess
What it is doing is using gmail to send the email. Is that allowed?
terminatedproccess
GitHub
GitHub - Surgeapp35/celery-send-email: Celery Proof of Concept
Celery Proof of Concept. Contribute to Surgeapp35/celery-send-email development by creating an account on GitHub.
angelo
angelo2y ago
from django.core.mail import send_mail yea... Django in this case is trying to spin up a mail server
terminatedproccess
so basically we can't use railway.app to send any emails to users? Just making sure as it will impact our hosting decisions.
angelo
angelo2y ago
You would have to use Mailgun or Postmark. Sorry about that 😢
terminatedproccess
those services allow you to send an email's info to them via api and they will send for you?
angelo
angelo2y ago
Yep and they handle mailer rep too
terminatedproccess
ok well thank you for your time Angelo
angelo
angelo2y ago
No problem, thank you for considering us!
Want results from more Discord servers?
Add your server