durusmail: quixote-users: Re: Need help in running quixote.demo as medusas' or twisteds' win32 service
Need help in running quixote.demo as medusas' or twisteds' win32 service
2004-03-29
Need help in running quixote.demo as medusas' ortwisteds' win32 service
2004-03-29
Need help in running quixote.demo as medusas' ortwisteds' win32 service
2004-03-29
Re: Need help in running quixote.demo as medusas' or twisteds' win32 service
2004-03-29
Re: Need help in running quixote.demo as medusas' or twisteds' win32 service
2004-03-29
Re: Need help in running quixote.demo as medusas' or twisteds' win32 service
2004-03-29
2004-03-29
Re: Need help in running quixote.demo as medusas' or twisteds' win32 service
Samir Patel
2004-03-29
Graham,
   Thanks for service.py file. I was struggling with python and windows
services for more than a month. Your solution is perfect. Jason's advice was
write on point and it help me to understand my problem but your service.py
solved my problem. I tested it on quixote.demo and for my application with
medusa and everything works (except 1 small thing: calendar control
(jsCalendar)  which uses javascript). This is by far most prefer and easiest
way to run windows services. Once again thanks both of you for solving my
problem which will allow me to use python more and more.
- Samir

----- Original Message -----
From: "Graham Fawcett" 
Newsgroups: gmane.comp.web.quixote.user
To: "Samir Patel" 
Sent: Monday, March 29, 2004 12:29 AM
Subject: Re: Need help in running quixote.demo as medusas' or twisteds'
win32 service


> Samir Patel wrote:
> > I have created a quixote program which I like to run as service on
> > windows machine using either medusa or twisted matrix as web server.
> > I am having trouble with both of them. Am I missing something or I have
> > to run it with IIS or Apache?
>
> Warning, I didn't read your stack traces too carefully; Jason's advice may
be
> more on target. I'll just share a bit from my experiences with Quixote and
> Windows services.
>
> Getting the win32 event loop to play nicely with another loop (like
Medusa's
> asyncore loop or Twisted's reactor loop) can be a pain, at least in my
limited
> experience. Fortunately, you can "fake it" by having a service that starts
a
> new process, and run Quixote or Twisted in the new process. When you stop
the
> service, it can kill the webserver process. I wrote a message to the list
last
> year that describes this:
>
>
http://mail.mems-exchange.org/pipermail/quixote-users/2003-July/001721.html
>
> The service.py script I use is available from that URL.
>
> There are drawbacks, though -- when the service stops, it brings your
server
> down hard, so it may leave logfiles unflushed, and could have other
> implications for your app. I recall some discusion back in July about ways
to
> attempt a more graceful shutdown, possibly through semaphores or sending
> messages through pipes between the processes. If you manage to write any
such
> graceful-shutdown code, I'd be happy to see it. ;-)
>
> Regards,
>
> -- Graham



reply