27 Replies
yaml [2024-09-03 01:13:15,841: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
the error is like this
Procfile web: gunicorn main:app worker: celery -A main.celery_app worker --loglevel=info
this is my Procfile code
2 years ago
first off, that Profile format is specific to Heroku and is not supported on railway, you would instead need two duplicate services, one to run gunicorn, and the other to run celery, you would define either command in the service settings.
secondly, amqp://guest:**@127.0.0.1:5672// is not the correct URL, make sure you are using environment variables set to the correct value.
2 years ago
you mean one for flask and one for celery
2 years ago
please see my second point
2 years ago
in don't see redis here?
I mean there are 2 services, one for running flask, one for running a worker like "celery -A main.celery_app worker --loglevel=info"
2 years ago
celery needs redis, where is redis? are you hosting redis elsewhere?
2 years ago
redis needs to be in the same project
2 years ago
before we continue, please carefully read this page so that you can understand the correct terminology -
excuse me sir, I have put it together, and the API is working, but after some time the background task that I created doesn't work, but locally it works fine, how can I see the Redis log?

2 years ago
where is the worker service?
2 years ago
have you read the basics page?
I only read what I think I understand, in Redis there are variables like in the documentation, the contents are redis_url I use that in production
2 years ago
please read the entire page
2 years ago
please read the basics page before we continue, it is a necessary read so that we can communicate with the correct terminology




