Preview: uwsgirouter4.py
Size: 260 B
//usr/share/doc/uwsgi/examples/router/uwsgirouter4.py
import uwsgi
def application(e,s):
node = uwsgi.cluster_best_node()
print(node)
if not node:
print("sorry node unavailable")
raise StopIteration
for part in uwsgi.send_message(node, 0, 0, e, 0, e['wsgi.input'].fileno(), uwsgi.cl()):
yield part
Directory Contents
Dirs: 0 × Files: 6