iLoveTux / pyservice

Cross-platform service library, turn your Python script into a service!
GNU General Public License v2.0
0 stars 0 forks source link

Windows service stuck stopping #20

Closed iLoveTux closed 8 years ago

iLoveTux commented 8 years ago

So, we have everything working except when I use the tornado example (modified for the new API) it installs/starts/removes just fine, but hangs on stopping. I hope I can fix this using something in the tornado API because I've found the win32serviceutils api to be a pain. I'm sure that this is due to windows and not the pywin32 package. I basically need a way to tell tornado to stop when a flag variable is set.

iLoveTux commented 8 years ago

Going to use the solution found here just altered a little for use with our project.

The basic idea is that we will spawn a new process which we can control with subprocess.Popen and then terminate it if it takes too long to stop.

iLoveTux commented 8 years ago

actually, I will be modifying this to use threads since I won't need to worry about separate executables.