def recruit(self, n=<NUM_LIT:1>):
logger.info("<STR_LIT>".format(n))<EOL>factory = self._get_bot_factory()<EOL>urls = []<EOL>q = _get_queue()<EOL>for _ in range(n):<EOL><INDENT>base_url = get_base_url()<EOL>worker = generate_random_id()<EOL>hit = generate_random_id()<EOL>assignment = generate_random_id()<EOL>ad_parameters = (<EOL>"<STR_LIT>"<EOL>)<EOL>ad_parameters = ad_parameters.format(self.nickname, assignment, hit, worker)<EOL>url = "<STR_LIT>".format(base_url, ad_parameters)<EOL>urls.append(url)<EOL>bot = factory(url, assignment_id=assignment, worker_id=worker, hit_id=hit)<EOL>job = q.enqueue(bot.run_experiment, timeout=self._timeout)<EOL>logger.warning("<STR_LIT>".format(job.id, url))<EOL><DEDENT>return urls<EOL>
Recruit n new participant bots to the queue