def run(): p = AsyncoreProcess() p.interval = 0.002 p.logger = open_logger(stdout=True) ids = range(0, 1) for i in ids: cots = iglob(os.path.join(os.curdir, 'cots', '*.cot')) t = LoadTestTask(cots=cots) t.settings.username = "******" % i t.settings.password = "******" t.settings.domain = "localhost" t.settings.resource = "conductor" t.settings.hostname = "localhost" t.settings.log_stdout = True t.settings.register = True t.settings.unregister = True p.register_task(t) p.run()
def run(): p = AsyncoreProcess() p.interval = 0.002 p.logger = open_logger(stdout=True) ids = range(0, 1) for i in ids: cots = iglob(os.path.join(os.curdir, 'cots', '*.cot')) t = LoadTestTask(cots=cots) t.settings.username = "******" % i t.settings.password = "******" t.settings.domain = "localhost" t.settings.resource = "conductor" t.settings.hostname = "localhost" t.settings.log_stdout = True t.settings.register = True t.settings.unregister = True p.register_task(t) p.run ()
hostname=self.settings.hostname, port=self.settings.port, tls=self.settings.tls, registercls=registercls) log_path = None if self.settings.log_dir: log_path = "%s.log" % os.path.join(self.settings.log_dir, self.settings.username) self.client.set_log(path=log_path, stdout=self.settings.log_stdout) if __name__ == '__main__': from conductor.lib.logger import open_logger from conductor.process import AsyncoreProcess p = AsyncoreProcess() p.logger = open_logger(stdout=True) for i in range(0, 1000): t = XMPPProcessTask() t.settings.username = "******" % i t.settings.password = "******" t.settings.domain = "localhost" t.settings.resource = "conductor" t.settings.hostname = "localhost" t.settings.log_stdout = False #True t.settings.register = False t.settings.unregister = True p.register_task(t) p.run()
registercls = Register jid = JID(self.settings.username, self.settings.domain, self.settings.resource) self.client = KamaeliaClient(unicode(jid), self.settings.password, hostname=self.settings.hostname, port=self.settings.port, tls=self.settings.tls, registercls=registercls) log_path = None if self.settings.log_dir: log_path = "%s.log" % os.path.join(self.settings.log_dir, self.settings.username) self.client.set_log(path=log_path, stdout=self.settings.log_stdout) if __name__ == '__main__': from conductor.lib.logger import open_logger from conductor.process import AsyncoreProcess p = AsyncoreProcess() p.logger = open_logger(stdout=True) for i in range(0, 1000): t = XMPPProcessTask() t.settings.username = "******" % i t.settings.password = "******" t.settings.domain = "localhost" t.settings.resource = "conductor" t.settings.hostname = "localhost" t.settings.log_stdout = False#True t.settings.register = False t.settings.unregister = True p.register_task(t) p.run ()