Can Railway run long-running async Python scripts?
mikey-shensu
FREEOP

10 months ago

Hi team 👋

I have a Python script that runs continuously in the background. It:
• Connects to a database(MongoDB) and cache(Redis)
• Periodically makes HTTP requests
• Processes and updates data every few seconds

It’s all built using asyncio, and I run it with [asyncio.run](asyncio.run)(main()).

❓ My goal:

I want to deploy this easily with Git push, without using Docker. Railway looks promising, but I’m not sure if it supports long-running background processes like this.

Questions:
1. Can Railway run a script like this continuously?
2. Any recommended setup for this on Railway?

Thanks! 🙏

2 Replies

mikey-shensu
FREEOP

10 months ago

138d1732-6483-4cfd-aa29-72d367023696


mjablonski
PRO

10 months ago

Yes, this is possible. If Railpack supports your application, you won't need docker.


Loading...