jkbrzt / chat

A simple chat app created to experiment with Redis, Gevent, Flask & Server-Sent Events.
https://twitter.com/jakubroztocil
248 stars 68 forks source link

some clarification request #4

Closed psihonavt closed 9 years ago

psihonavt commented 9 years ago

@jakubroztocil would you please provide some explanation regarding running this app through gunicorn + gevent workers? In particular I can not understand how we're able to perform non-pending request to /stream with EventSource('/stream')? (In case of running app with gevent.pywsgi.WSGIServer I'll receive pending request for /stream but with gunicorn+gevent worker - 200 OK)

psihonavt commented 9 years ago

In order to make chat app working through gevent.pywsgi.WSGIServer all the stuff should be monkey-patched with gevent.monkey.patch_socket() (and this requirement is kind a reasonable).