I have a Twisted application that someone else wrote. There is a file run.py which makes it run in the foreground. There is also a twistd plugin named as service.tac that makes it run in the background. Around 90% of the code is the same in both the .py and .tac file.
Is it possible to combine the two together? Or is that a bad idea?
You can run the tac file in the foreground: twistd -n -y service.tac.
So perhaps you can just delete the run.py file.
Right approach for running a Twisted application in the foreground or background