def init(loop):
print("Generating Fake Data")
pg = await init_postgres(conf['postgres'], loop)
fake = Factory.create()
fake.seed(1234)
await preapre_tables(pg)
quiestion_num = 1000
choices_num = 5
question_ids = await generate_questions(pg, quiestion_num, fake)
await generate_choices(pg, choices_num, fake, question_ids)
pg.close()
await pg.wait_closed()
评论列表
文章目录