[Twisted-web] Shutting down a xmlrpc server with an xmlrpc call

Phil Mayers p.mayers at imperial.ac.uk
Mon Jun 20 08:49:56 MDT 2005


Rasjid Wilcox wrote:
> Hi,
> 
> I am new to twisted-web, so my apologies if this is obvious.  I am happy to be 
> pointed at the appropriate documentation.
> 
> I am writing an xmlrpc server, and would like to there to be an xmlrpc call to 
> shutdown the server gracefully.
> 
> Ideally upon the call being made, it would return a 'success' response to the 
> client, the reactor would stop taking any new requests, would finish any 
> existing ones, and then exit cleanly.
> 
> What I currently have is -
>     def xmlrpc_quit(self):
>         reactor.stop()

Maybe:

reactor.callLater(1, reactor.stop)
return "closing in 1 second"

?



More information about the Twisted-web mailing list