From 7a5ec8ae22cfa94d56becaa24d8e5a7a32ab8830 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 20 May 2008 19:45:44 +0000 Subject: [PATCH] added echo system method git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1334 9efc2488-bf62-4759-914b-345cdb29e865 --- src/python/osrf/app.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/python/osrf/app.py b/src/python/osrf/app.py index 721535f..a073f89 100644 --- a/src/python/osrf/app.py +++ b/src/python/osrf/app.py @@ -145,11 +145,22 @@ class Application(object): stream = True ) + Application.register_method( + api_name = 'opensrf.system.echo', + method = 'sysmethod_echo', + argc = 1, + stream = True + ) def sysmethod_time(self, request): '''@return type:number The current epoch time ''' return time.time() + def sysmethod_echo(self, request, *args): + '''@return type:string The current epoch time ''' + for a in args: + request.respond(a) + def sysmethod_introspect(self, request, prefix=None): ''' Generates a list of methods with method metadata @param type:string The limiting method name prefix. If defined, @@ -167,7 +178,6 @@ class Application(object): 'argc' : method.argc, 'params' : [], # XXX parse me 'desc' : method.get_doc() # XXX parse me - }) -- 2.43.2