support for motor and pulsar servers, thanks Niphlod

This commit is contained in:
mdipierro
2013-01-07 10:34:31 -06:00
parent c625be0a4a
commit 69d00a50a6
2 changed files with 17 additions and 1 deletions

View File

@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2013.01.06.09.27.15
Version 2.4.1-alpha.2+timestamp.2013.01.07.10.33.48

View File

@@ -163,6 +163,22 @@ class Servers:
"tcp://127.0.0.1:9996")
mongrel2_handler(app, conn, debug=False)
@staticmethod
def motor(app, address, **options):
#https://github.com/rpedroso/motor
import motor
app = motor.WSGIContainer(app)
http_server = motor.HTTPServer(app)
http_server.listen(address=address[0], port=address[1])
#http_server.start(2)
motor.IOLoop.instance().start()
@staticmethod
def pulsar(app, address, **options):
from pulsar.apps import wsgi
sys.argv = ['anyserver.py']
s = wsgi.WSGIServer(callable=app, bind="%s:%d" % address)
s.start()
def run(servername, ip, port, softcron=True, logging=False, profiler=None):
if logging: