0 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
10 months 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.
10 months ago
you mean one for flask and one for celery
10 months ago
please see my second point
10 months 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"
10 months ago
celery needs redis, where is redis? are you hosting redis elsewhere?
10 months ago
redis needs to be in the same project
10 months 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?
10 months ago
where is the worker service?
10 months 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
10 months ago
please read the entire page
10 months ago
please read the basics page before we continue, it is a necessary read so that we can communicate with the correct terminology