The right approach to launch a Twisted app in the foreground or in the background

I have a Twisted app that someone wrote. There is a run.py file that runs it in the foreground. There is also a twistd plugin called service.tac that makes it work in the background. About 90% of the code is the same in .py and .tac files.

Is it possible to combine these two? Or is this a bad idea?

+3
source share
1 answer

You can run the file tac in the foreground: twistd -n -y service.tac.

Therefore, perhaps you can simply delete the file run.py.

+4
source

All Articles