What is the correct `Start Command` for a simple Python app?

Hi, I have a simple python app that use websocket from a forex exchange api.
Then it use dataa to just analysis and write logs. (no provide API or web)
I deployed on Background worker, but it always stuck at “==> Running ‘python main.py’”
In my “main.py”, I set print method at the top of file but no log is found on Render logs.

import json
import logging
print("Prepare start")
def main():
  print("Prepare start")
if __name__ == "__main__":

Can anyone tell me what would be the right command for this application?

Thanks for your attention!


‘python main.py’ should be alright in your case if that’s how you’re also launching your app locally.

Did you verify that your if statement is succeeding in launching main() here?

Try flushing the buffer while print-ing to see the output in your logs → print(‘something’, flush=True)

Render Support, UTC+3

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.