PHP 8.5.2
Preview: uwsgirouter3.py Size: 407 B
//usr/share/doc/uwsgi/examples/router/uwsgirouter3.py

import uwsgi

current_node = 0

def application(e,s):

	global current_node

	nodes = uwsgi.cluster_nodes()
	print(nodes)

	if len(nodes) == 0:
		print("no cluster node available")
		raise StopIteration

	if current_node >= len(nodes):
		current_node = 0

	node = nodes[current_node]

	for part in uwsgi.send_message(node, 0, 0, e, 0, e['wsgi.input'].fileno(), uwsgi.cl()):
		yield part 

	current_node+=1

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
582 B lrw-r--r-- 2024-02-08 16:35:28
Edit Download
1.84 KB lrw-r--r-- 2024-04-17 16:23:48
Edit Download
160 B lrw-r--r-- 2024-02-08 16:35:28
Edit Download
407 B lrw-r--r-- 2024-04-17 16:23:48
Edit Download
260 B lrw-r--r-- 2024-04-17 16:23:48
Edit Download
178 B lrw-r--r-- 2024-02-08 16:35:28
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).