提交修改
This commit is contained in:
parent
04fffe42b9
commit
6c19cdedae
|
@ -1,5 +1,12 @@
|
|||
changes log
|
||||
======================================
|
||||
------------------------------
|
||||
1.0.1 2023-11-28
|
||||
|
||||
1.打印时输出连接信息
|
||||
2.建表增加异常处理
|
||||
|
||||
[mh]
|
||||
|
||||
------------------------------
|
||||
1.0.0 2023-10-26
|
||||
|
|
|
@ -13,7 +13,7 @@ from schedule import every, repeat, run_pending
|
|||
1. 用于数据库的持续增、删、改,目前支持MySQL和Oracle
|
||||
2. DBConfig.py 为数据库连接配置,使用时需要修改连接信息
|
||||
3. 脚本运行会创建一个测试表
|
||||
4. 每秒往测试表中插入1条数据
|
||||
4. 每秒往测试表中插入200条数据
|
||||
5. 每5分钟删除100条数据
|
||||
6. 每1小时,修改一下数据
|
||||
"""
|
||||
|
@ -55,8 +55,10 @@ def execute_sql(sql):
|
|||
def create_table():
|
||||
print("start create table...")
|
||||
sql_string = db_config["create_sql_string"]
|
||||
|
||||
try:
|
||||
execute_sql(sql_string)
|
||||
except:
|
||||
print("table maybe exists,continue this create table.")
|
||||
|
||||
|
||||
#每秒插入1条数据
|
||||
|
|
Loading…
Reference in New Issue