gunicornを使用してDjangoアプリケーションを実行する必要があります。私はドキュメントを読んで、私は私がすべきようにすべてを設定したと思いますが、私が実行すると
gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker app.wsgi:application
次のエラーメッセージが表示されます
2013-02-01 18:25:17 [25394] [INFO] Booting worker with pid: 25394
2013-02-01 18:25:18 [25394] [ERROR] Exception in worker process:
Traceback (most recent call last):
File ".../app-root/data/lib/python2.7/site-packages/gunicorn/arbiter.py", line 485, in spawn_worker
worker.init_process()
File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 131, in init_process
super(GeventWorker, self).init_process()
File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/base.py", line 104, in init_process
self.run()
File ".../app-root/data/lib/python2.7/site-packages/socketio/sgunicorn.py", line 14, in run
self.socket.setblocking(1)
AttributeError: 'GeventSocketIOWorker' object has no attribute 'socket'
Traceback (most recent call last):
File ".../app-root/data/lib/python2.7/site-packages/gunicorn/arbiter.py", line 485, in spawn_worker
worker.init_process()
File ".../data/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 131, in init_process
super(GeventWorker, self).init_process()
File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/base.py", line 104, in init_process
self.run()
File ".../app-root/data/lib/python2.7/site-packages/socketio/sgunicorn.py", line 14, in run
self.socket.setblocking(1)
AttributeError: 'GeventSocketIOWorker' object has no attribute 'socket'
2013-02-01 18:25:18 [25394] [INFO] Worker exiting (pid: 25394)
django_socketioで実行すると、すべてが正常に機能します。本当に重要なことを見逃す必要があります。
ご協力ありがとうございました