修改参数
This commit is contained in:
parent
e0cbb1d5a3
commit
1387df9fff
|
@ -14,7 +14,7 @@ from faker import Faker
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#保存为csv文件
|
#保存为csv文件
|
||||||
def save_data_csv(file_name,lines=50000):
|
def save_data_csv(file_name,lines=100):
|
||||||
#获取数据
|
#获取数据
|
||||||
datas = faker_data(lines)
|
datas = faker_data(lines)
|
||||||
#保存
|
#保存
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding:utf-8 -*-
|
# -*- coding:utf-8 -*-
|
||||||
|
import _load
|
||||||
|
|
||||||
import faker_data
|
import faker_data
|
||||||
import shutil
|
|
||||||
import csv
|
import csv
|
||||||
|
|
||||||
from schedule import every, repeat, run_pending
|
from schedule import every, repeat, run_pending
|
||||||
|
@ -58,7 +59,7 @@ def new():
|
||||||
if not finfo[2].exists():
|
if not finfo[2].exists():
|
||||||
finfo[2].mkdir()
|
finfo[2].mkdir()
|
||||||
# 创建文件
|
# 创建文件
|
||||||
faker_data.save_data_csv(finfo[4], lines=10)
|
faker_data.save_data_csv(finfo[4], lines=50000)
|
||||||
|
|
||||||
|
|
||||||
# 每2秒插入10条数据
|
# 每2秒插入10条数据
|
||||||
|
|
Loading…
Reference in New Issue