diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-01-13 15:26:32 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-01-13 15:26:32 -0500 |
commit | e026b9e5d273042a0145488e967bd30bf30f1ca1 (patch) | |
tree | 00f2cb37e2fa6f19ca225da6dc65be88b0d30380 /func | |
parent | 3d060b8d56775508f8ce463240525ed5a1280d48 (diff) | |
download | third_party-func-e026b9e5d273042a0145488e967bd30bf30f1ca1.tar.gz third_party-func-e026b9e5d273042a0145488e967bd30bf30f1ca1.tar.xz third_party-func-e026b9e5d273042a0145488e967bd30bf30f1ca1.zip |
Added sleep function to test module for testing.
Diffstat (limited to 'func')
-rw-r--r-- | func/minion/modules/test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/func/minion/modules/test.py b/func/minion/modules/test.py index 3a8c33e..d3ebd61 100644 --- a/func/minion/modules/test.py +++ b/func/minion/modules/test.py @@ -17,5 +17,14 @@ class Test(func_module.FuncModule): def ping(self): return 1 + def sleep(t): + """ + Sleeps for t seconds, and returns time of day. + Simply a test function for trying out async and threaded voodoo. + """ + t = int(t) + time.sleep(t) + return time.time() + methods = Test() register_rpc = methods.register_rpc |