L
L
lexus light @lexus2022-03-19 17:21:20
Python
lexus light @lexus, 2022-03-19 17:21:20

How to run a simple eternal python process on heroku?

I have two python files:
1) a flask server that handles requests.
2) a script that generates a file every 5 seconds.

When run on a local machine, everything works - the first script works with the file of the second script.
When run on heroku, Procfile runs web(1) and worker(2) scripts, but worker does not run.
How can you make it work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2022-03-19
@AlexNest

First of all, look at the logs.
Another thing is that the problem may be in the way heroku works with files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question