Hello,
I want to create a twisted daemon from my application:
if __name__ == '__main__':
import nfdprocess, sys
log.startLogging(sys.stdout)
serverContext = ServerContextFactory()
serverContext.protocol = nfdprocess.HandlePacket
port =int(sys.argv[1])
checkT = checkTables()
checkT.resetTablesToOffline()
outgoingTable = LoopingCall(checkT.checkOutgoingMessageQueue,serverContext)
incomingTable = LoopingCall(checkT.checkIncomingMessageQueue,serverContext)
checkStates= LoopingCall(checkT.checkConnectionStates,serverContext)
outgoingTable.start(0.5)
incomingTable.start(1)
checkStates.start(1)
reactor.listenSSL(port, serverContext, serverContext)
reactor.run()
Currently I have a class called nfdmessenger.
I am running the object.
> python nfdmessenger.py 2000
However I would run it as a deamon. Not sure how to do this? Can somebody be so
kind and offer some pointers on this?
Much appreciated,
Garyc
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python