예제 #1
0
def update_carbon(signum):
    # connect to the carbon server
    carbon_fd = uwsgi.connect(CARBON_SERVER)
    # send data to the carbon server
    uwsgi.send(carbon_fd, "uwsgi.%s.requests %d %d\n" % (uwsgi.hostname, uwsgi.total_requests(), int(time.time())))
    # close the connection with the carbon server
    uwsgi.close(carbon_fd)
예제 #2
0
파일: uwsgirouter5.py 프로젝트: 20tab/uwsgi
import uwsgi

fd = uwsgi.connect("127.0.0.1:3033")

def application(e,s):

	for part in uwsgi.send_message(fd, 0, 4, e, 30, e['wsgi.input'].fileno(), uwsgi.cl()):
		yield part 
예제 #3
0
import uwsgi

fd = uwsgi.connect("127.0.0.1:3033")


def application(e, s):

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