Example #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
Example #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
def application(env, start_response):
    start_response('200 Ok', [('Content-Type', 'text/html')])
    return uwsgi.rpc('127.0.0.1:3031', 'hello')
Example #4
0
def helloapp(env, start_response):
	start_response('200 Ok', [('Content-Type', 'text/html')])
	return uwsgi.rpc('127.0.0.1:3031', 'hello')
Example #5
0
File: rpc.py Project: 20tab/uwsgi
import uwsgi


def hello():
    return "Hello World"

print uwsgi.register_rpc("hello", hello)


print uwsgi.rpc(None, "hello")
Example #6
0
import uwsgi


def hello():
    return "Hello World"


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

print(uwsgi.rpc(None, "hello"))
Example #7
0
import uwsgi


def hello():
    return "Hello World"

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


print(uwsgi.rpc(None, "hello"))
Example #8
0
import uwsgi


def hello():
    return "Hello World"


print uwsgi.register_rpc("hello", hello)

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