What's the difference between a twistd plugin and a twistd service?

六眼飞鱼酱① 提交于 2019-12-13 13:02:36

问题


Apparently you can create services that are run with Twisted's twistd in two different ways. On the one hand you can create services using the Twisted Application Infrastructure and in the other you can create a service using the Twisted Plugin System. It seems like besides some differences in how you start the the app on the command line, and the means by which you write the actual service, they are two ways to accomplish the same thing?


回答1:


Looks like I found the answer:

http://twistedmatrix.com/pipermail/twisted-python/2009-September/020346.html

Which is the recommended or preferred way to deploy an app that will leverage twistd: designing the app as a twistd plugin or creating a Service and using a .tac file?

A plugin is nicer in that you can have command-line options, e.g.

$ twistd -n web --path=/tmp --port=8080



来源:https://stackoverflow.com/questions/6720021/whats-the-difference-between-a-twistd-plugin-and-a-twistd-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!