[Twisted-Python] Service as a daemon

John Toohey jt at parspro.com
Fri Aug 13 11:36:11 EDT 2004


Thanks for your help. I just tried this, but the startService method is 
still not called. Is there something else I need to do?

John

On Aug 13, 2004, at 10:35 AM, Itamar Shtull-Trauring wrote:

> 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
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>





More information about the Twisted-Python mailing list