summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-23 23:46:27 +0300
committermakkalot <makkalot@gmail.com>2008-07-23 23:46:27 +0300
commit70a38066b60b30904344ea29d00909cca522a0e0 (patch)
treeec480f05e83145473744d5c02aa5bcb9b20653c3 /funcweb
parenta4bc951089282e89f43cb2ae5ca48dec32aacf95 (diff)
downloadfunc-70a38066b60b30904344ea29d00909cca522a0e0.tar.gz
func-70a38066b60b30904344ea29d00909cca522a0e0.tar.xz
func-70a38066b60b30904344ea29d00909cca522a0e0.zip
adding some test code for sample usage
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/tests/bork.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/funcweb/funcweb/tests/bork.py b/funcweb/funcweb/tests/bork.py
new file mode 100644
index 0000000..45631f7
--- /dev/null
+++ b/funcweb/funcweb/tests/bork.py
@@ -0,0 +1,37 @@
+from func.overlord.client import Overlord
+from func.jobthing import *
+import time
+
+
+print "Now running one with getattr "
+module = "echo"
+method = "run_int"
+
+fc_new = Overlord("*",async = True)
+new_job_id = getattr(getattr(fc_new,module),method)(500)
+code_status = fc_new.job_status(new_job_id)[0]
+
+print "The code status is : ",code_status
+
+while code_status != JOB_ID_FINISHED:
+ print "Waiting the run_int to finish "
+ code_status = fc_new.job_status(new_job_id)[0]
+ time.sleep(2)
+print "The int operation is finished"
+
+
+
+print "Creating the object"
+fc = Overlord("*",async = True)
+job_id = fc.echo.run_string("Merhaba")
+code_status = fc.job_status(job_id)[0]
+
+print "The code status is : ",code_status
+
+while code_status != JOB_ID_FINISHED:
+ print "Waiting the run_string to finish "
+ code_status = fc.job_status(job_id)[0]
+ time.sleep(2)
+print "The run_string was finished"
+
+