3 months ago
Hi, I'm a beginner in this topic, so I would like to ask for help, I have a flask subsystem, in this case app.py which I call in the procfile and it starts perfectly, but there is another timed py called timer.py which is also next to the app, my question is if this timer calls 3 more files at specified intervals which are timed, how can I make the procfile run everything?
The principle:
- app.py
-timer.py - fiel1, file2, file3
All called files are closed soon, but the app and timer process should run.
I tried this in the forums but it didn't call the files.
web: python app.py
worker: python timer.py
Thanks for your help.
Translated with DeepL.com (free version)
6 Replies
3 months ago
Hello,
You would want two different Railway services in your Railway project.
One service would have its start command set to python app.py
The other service would have its start command set to python timer.py
Each service would deploy from the same GitHub repository and have the same service variables.
Please review this page to familureise yourself with the terminology I have just used -
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
If by "call the repo again" you mean deploy a new service, then yes absolutely!
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
Hi, yes, I mean that I'm re-running it from github, just changing the startup command.
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
If by "re-running it from github" you mean deploy a new service, then yes absolutely!
Status changed to Awaiting User Response railway[bot] • 3 months ago
Status changed to Awaiting Railway Response railway[bot] • 3 months ago