aupapitest
This commit is contained in:
parent
bd59033555
commit
2f8381a0c5
21
auptest.py
21
auptest.py
@ -36,14 +36,27 @@ CREATE TABLE pims_api_log (
|
|||||||
import mysql.connector
|
import mysql.connector
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
# host = 'rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com' # 服务器访问使用
|
||||||
|
# database = 'jingbo_test' # 服务器访问使用
|
||||||
|
host = 'rm-2zehj3r1n60ttz9x5ko.mysql.rds.aliyuncs.com' # 北京访问使用
|
||||||
|
database = 'jingbo_test' # 北京访问使用
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 配置数据库连接信息,根据实际情况修改
|
# 配置数据库连接信息,根据实际情况修改
|
||||||
config = {
|
config = {
|
||||||
"user": "your_username",
|
"user": "jingbo",
|
||||||
"password": "your_password",
|
"password": "shihua@123",
|
||||||
"host": "your_host",
|
"host": host,
|
||||||
"database": "your_database"
|
"database": "jingbo_test"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def insert_api_log(request_time, request_ip, request_url, request_method, request_params, response_status_code, response_content, response_time):
|
def insert_api_log(request_time, request_ip, request_url, request_method, request_params, response_status_code, response_content, response_time):
|
||||||
try:
|
try:
|
||||||
# 建立数据库连接
|
# 建立数据库连接
|
||||||
|
Loading…
Reference in New Issue
Block a user