#redis railway
28 messages · Page 1 of 1 (latest)
excuse me sir, i am trying to use redis celery for my flask app
and finally i get error
[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
web: gunicorn main:app
worker: celery -A main.celery_app worker --loglevel=info```
this is my Procfile code
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.
Yes sir, I have run two services, one for flask and one for redis
you mean one for flask and one for celery
please see my second point
yes
okey wait
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"
celery needs redis, where is redis? are you hosting redis elsewhere?
I have redis directly from railway
and the url that I use is redis_url
redis needs to be in the same project
left is redis right is flask, is this wrong sir?
before we continue, please carefully read this page so that you can understand the correct terminology -
okey sir
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?
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
please read the entire page
this might be the log but i can only see this
please read the basics page before we continue, it is a necessary read so that we can communicate with the correct terminology
sorry sir Sorry sir, if it's like this, what's the cause, sir?