DRF-REDIS: Celery Task Not Working

alphacodz
HOBBY

a year ago

I deployed my Celery Task using Railway with Redis as the broker. It works on localhost, but it doesn't work on the staging environment.My railway.toml file.

[build]
builder = "NIXPACKS"
buildCommand = "echo building!"

[deploy]
runtime = "UNSPECIFIED"
numReplicas = 1
startCommand = "gunicorn setup.wsgi.test_wsgi --log-file - && celery -A setup worker -l INFO"
sleepApplication = true
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10

7 Replies

Could you share more details, please? What isn't working?

It's also highly likely that this is an issue with your application, not the Railway platform. Unfortunately we're unable to provide help for application-specific issues -- I'd recommend checking out other communities such as https://stackoverflow.com/ for general programming-related questions.


a year ago

Yep this is an issue with your config, you are wanting to run gunicorn and celery meaning you need two Railway services, one service will run gunicorn and one service will run celery.


alphacodz
HOBBY

a year ago

Yep this is an issue with your config, you are wanting to run gunicorn and celery meaning you need two Railway services, one service will run gunicorn and one service will run celery.

So how do i structure it, to make it work?


a year ago

I had covered that question in my message.


alphacodz
HOBBY

a year ago

Could you share more details, please? What isn't working?

It's also highly likely that this is an issue with your application, not the Railway platform. Unfortunately we're unable to provide help for application-specific issues -- I'd recommend checking out other communities such as https://stackoverflow.com/ for general programming-related questions.

The tasks are not running.


a year ago

Please read my message and make the changes I suggested.


alphacodz
HOBBY

a year ago

Please read my message and make the changes I suggested.

Noted Chief, I'll do that


DRF-REDIS: Celery Task Not Working - Railway Help Station