Exemplo n.º 1
0
def rpc():
    node = str(request.form['node'])

    fargs = str(request.form['args'])

    args = fargs.split()

    if len(args) > 0:
        ret = uwsgi.rpc(str(node), str(request.form['func']), *map(str, args))
    else:
        ret = uwsgi.rpc(str(node), str(request.form['func']))

    #flash("rpc \"%s\" returned: %s" % (request.form['func'], ret) )

    return ret
Exemplo n.º 2
0
def rpc():
    node = str(request.form['node'])

    fargs = str(request.form['args'])

    args = fargs.split()


    if len(args) > 0:
        ret = uwsgi.rpc(str(node), str(request.form['func']), *map(str, args))
    else:
        ret = uwsgi.rpc(str(node), str(request.form['func']))

    #flash("rpc \"%s\" returned: %s" % (request.form['func'], ret) )

    return ret
Exemplo n.º 3
0
def application(env, start_response):
    start_response('200 Ok', [('Content-Type', 'text/html')])
    return uwsgi.rpc('127.0.0.1:3031', 'hello')
Exemplo n.º 4
0
def helloapp(env, start_response):
	start_response('200 Ok', [('Content-Type', 'text/html')])
	return uwsgi.rpc('127.0.0.1:3031', 'hello')
Exemplo n.º 5
0
Arquivo: rpc.py Projeto: 20tab/uwsgi
import uwsgi


def hello():
    return "Hello World"

print uwsgi.register_rpc("hello", hello)


print uwsgi.rpc(None, "hello")
Exemplo n.º 6
0
import uwsgi


def hello():
    return "Hello World"


print(uwsgi.register_rpc("hello", hello))

print(uwsgi.rpc(None, "hello"))
Exemplo n.º 7
0
import uwsgi


def hello():
    return "Hello World"

print(uwsgi.register_rpc("hello", hello))


print(uwsgi.rpc(None, "hello"))
Exemplo n.º 8
0
import uwsgi


def hello():
    return "Hello World"


print uwsgi.register_rpc("hello", hello)

print uwsgi.rpc(None, "hello")
Exemplo n.º 9
0
 def rpc(self, endpoint, func, *params):
     return uwsgi.rpc(endpoint, func, *params)