support for motor and pulsar servers, thanks Niphlod
This commit is contained in:
2
VERSION
2
VERSION
@@ -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
|
||||
|
||||
16
anyserver.py
16
anyserver.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user