no = 0 for zz in donot: if i.find(zz) != -1: no = 1 break if no: continue teller += 1 try: ievent = Ircevent() ievent.nick = 'test' ievent.userhost = 'test@test' q = Queue.Queue() ievent.queues.append(q) ievent.channel = '#dunkbots' ievent.txt = i queues.append((testnr, teller, i, q)) if not plugins.trydispatch(bot, ievent): print "\ncan't execute %s\n" % i queues.remove((testnr, teller, i, q)) except: handle_exception() thr.start_new_thread(qreader, ()) for a in range(nrtimes): thr.start_new_thread(dotest, (a, )) while 1: time.sleep(1)
res = q.get_nowait() print "%s => %s" % (cmnd, res) queues.remove(i) except: pass def dohammer(): for j in range(nrtimes): try: ievent = Ircevent() ievent.nick = 'test' ievent.userhost = 'test@test' q = Queue.Queue() ievent.queue = q ievent.channel = '#dunkbots' ievent.txt = nail queues.append((nail, q)) if not plugins.trydispatch(ievent): print "\ncan't execute %s\n" % nail queues.remove((nail, q)) except: handle_exception() thr.start_new_thread(qreader, ()) thr.start_new_thread(dohammer, ()) while 1: time.sleep(1)
try: (cmnd, q) = i res = q.get_nowait() print "%s => %s" % (cmnd, res) queues.remove(i) except: pass def dohammer(): for j in range(nrtimes): try: ievent = Ircevent() ievent.nick = 'test' ievent.userhost = 'test@test' q = Queue.Queue() ievent.queue = q ievent.channel = '#dunkbots' ievent.txt = nail queues.append((nail, q)) if not plugins.trydispatch(ievent): print "\ncan't execute %s\n" % nail queues.remove((nail, q)) except: handle_exception() thr.start_new_thread(qreader, ()) thr.start_new_thread(dohammer, ()) while 1: time.sleep(1)
a = examples.getexamples() teller = 0 while 1: nrloop -= 1 if nrloop == 0: break random.shuffle(a) for z in a: teller += 1 no = 0 for zz in donot: if z.find(zz) != -1: no = 1 break print z try: print geturl('http://localhost:8088/dispatch?command=%s' % z) except IOError: pass except: os._exit(0) for i in range(100): start_new_thread(dowebtest, (10, )) try: while 1: time.sleep(1) except: os._exit(0)
for zz in donot: if i.find(zz) != -1: no = 1 break if no: continue teller += 1 try: ievent = Ircevent() ievent.nick = 'test' ievent.userhost = 'test@test' q = Queue.Queue() ievent.queues.append(q) ievent.channel = '#dunkbots' ievent.txt = i queues.append((testnr, teller, i, q)) if not plugins.trydispatch(bot, ievent): print "\ncan't execute %s\n" % i queues.remove((testnr, teller, i, q)) except: handle_exception() thr.start_new_thread(qreader, ()) for a in range(nrtimes): thr.start_new_thread(dotest, (a, )) while 1: time.sleep(1)
teller = 0 while 1: nrloop -= 1 if nrloop == 0: break random.shuffle(a) for z in a: teller += 1 no = 0 for zz in donot: if z.find(zz) != -1: no = 1 break print z try: print geturl('http://localhost:8088/dispatch?command=%s' % z) except IOError: pass except: os._exit(0) for i in range(100): start_new_thread(dowebtest, (10, )) try: while 1: time.sleep(1) except: os._exit(0)