[Twisted-Python] Service as a daemon
Itamar Shtull-Trauring
itamar at itamarst.org
Fri Aug 13 10:35:26 EDT 2004
On Fri, 2004-08-13 at 10:05, John Toohey wrote:
> The .tap file is now as follows :-
> def makeService(config):
> pbport = int(config["pbport"])
>
> application = service.Application('feedserver', uid=1, gid=1)
> f = FeedService('feedserver')
> reactor.connectTCP('localhost',8002,f.getFactory())
>
> f.setServiceParent(service.IServiceCollection(application))
If you're using taps you don't create the application yourself. Instead,
you *return* a service. So:
def makeService(config):
f = FeedService('feedserver')
reactor.connectTCP('localhost',8002,f.getFactory())
return f
--
Itamar Shtull-Trauring http://itamarst.org
More information about the Twisted-Python
mailing list