##// END OF EJS Templates
Initial version of working refactored ipcluster....
Initial version of working refactored ipcluster. This new version uses Twisted's cross platform process management API and provides: * New command line parsing using argparse. This allows for different subcommands (ipcluster local, ipcluster pbs, ipcluster mpirun, etc). * Currently working local and mpirun stating of clusters. * Almost working pbs starting. This has no docs and no tests as of yet and should be considered a tech preview.

File last commit:

r1395:1feaf0a3
r1770:49f63bba
Show More
task2.py
44 lines | 871 B | text/x-python | PythonLexer
#!/usr/bin/env python
# encoding: utf-8
from IPython.kernel import client
import time
tc = client.TaskClient()
mec = client.MultiEngineClient()
mec.execute('import time')
for i in range(24):
tc.run(client.StringTask('time.sleep(1)'))
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=False)"
print tc.queue_status()
for i in range(24):
tc.run(client.StringTask('time.sleep(1)'))
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=True)"
print tc.queue_status(True)
for i in range(12):
tc.run(client.StringTask('time.sleep(2)'))
print "Queue status (vebose=True)"
print tc.queue_status(True)
qs = tc.queue_status(True)
sched = qs['scheduled']
for tid in sched[-4:]:
tc.abort(tid)
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=True)"
print tc.queue_status(True)