[Opensrf-commits] r1334 - trunk/src/python/osrf

svn at svn.open-ils.org svn at svn.open-ils.org
Tue May 20 15:45:47 EDT 2008


Author: erickson
Date: 2008-05-20 15:45:44 -0400 (Tue, 20 May 2008)
New Revision: 1334

Modified:
   trunk/src/python/osrf/app.py
Log:
added echo system method

Modified: trunk/src/python/osrf/app.py
===================================================================
--- trunk/src/python/osrf/app.py	2008-05-20 19:45:10 UTC (rev 1333)
+++ trunk/src/python/osrf/app.py	2008-05-20 19:45:44 UTC (rev 1334)
@@ -145,11 +145,22 @@
             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 @@
                 'argc' : method.argc,
                 'params' : [], # XXX parse me
                 'desc' : method.get_doc() # XXX parse me
-
             })
 
 



More information about the opensrf-commits mailing list