From 1387df9fffffa39808d7a48d1549d496e2c62f30 Mon Sep 17 00:00:00 2001 From: halliday Date: Wed, 25 Oct 2023 16:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/faker_data.py | 2 +- bin/fileDataCreating.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/faker_data.py b/bin/faker_data.py index 01c4e26..c6c8c12 100644 --- a/bin/faker_data.py +++ b/bin/faker_data.py @@ -14,7 +14,7 @@ from faker import Faker """ #保存为csv文件 -def save_data_csv(file_name,lines=50000): +def save_data_csv(file_name,lines=100): #获取数据 datas = faker_data(lines) #保存 diff --git a/bin/fileDataCreating.py b/bin/fileDataCreating.py index e8f5e63..a17513c 100644 --- a/bin/fileDataCreating.py +++ b/bin/fileDataCreating.py @@ -1,6 +1,7 @@ # -*- coding:utf-8 -*- +import _load + import faker_data -import shutil import csv from schedule import every, repeat, run_pending @@ -58,7 +59,7 @@ def new(): if not finfo[2].exists(): finfo[2].mkdir() # 创建文件 - faker_data.save_data_csv(finfo[4], lines=10) + faker_data.save_data_csv(finfo[4], lines=50000) # 每2秒插入10条数据