[Twisted-Python] How do I get at the Application object (usin g twistd)

Jeff.Silver at edl.uk.eds.com Jeff.Silver at edl.uk.eds.com
Thu Feb 3 02:12:30 MST 2005


> >Twisted documentation says I can manually save my
> >application by using
> >the  'save' method on the Application object. That's fine if I'm
> >creating the  Application object myself, but how do I get at this 
> >object if I'm using  twistd to start it?
> >
> >  ...
> 
>   The Application is the wrong place to serialize updated DNS
> records.  The Application is for application configuration 
> (what user should it run as?  what services should it 
> provide?).  Application data should be serialized elsewhere.
>  Jp

Hmmm... I take your point. But...
I was looking at doing it at the Application level because that
seemed to fit with how twisted.names works. The full configuration
of the DNS server, including all the name<->address mapping, is
in the dns.tap file. When the server is stopped, this is saved
in the dns-shutdown.tap file. So, if I apply some updates, then
shut the server down, I can restart the server complete with
updates by using dns-shutdown.tap. What I wanted to do was utilize
that mechanism rather than do my own serializing, and have to 
manage two configuration files.
Perhaps the question changes to:
   How do I separate the application data (DNS config) from
   the rest of the application?
   How do I start the application using that separate data?

It looked so elegant just to re-use the shutdown code!

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20050203/2881caff/attachment.html>


More information about the Twisted-Python mailing list