This commit is contained in:
parent
7248f6bb14
commit
ac11720747
|
|
@ -9,11 +9,11 @@ BATCH_SIZE=${BATCH_SIZE:-"1000"}
|
||||||
LOG_LEVEL=${LOG_LEVEL:-"INFO"}
|
LOG_LEVEL=${LOG_LEVEL:-"INFO"}
|
||||||
DATA_PVC_NAME=${DATA_PVC_NAME:-"data-import-export-pvc"}
|
DATA_PVC_NAME=${DATA_PVC_NAME:-"data-import-export-pvc"}
|
||||||
# todo: 下面参数使用时需要修改
|
# todo: 下面参数使用时需要修改
|
||||||
DB_HOST=${DB_HOST:-"xx-postgres-service"}
|
DB_HOST=${DB_HOST:-"test-db.db.svc.cluster.local"}
|
||||||
DB_PORT=${DB_PORT:-"5432"}
|
DB_PORT=${DB_PORT:-"6432"}
|
||||||
DB_NAME=${DB_NAME:-"xx"}
|
DB_NAME=${DB_NAME:-"idrc"}
|
||||||
DB_USER=${DB_USER:-"xx_db_user"}
|
DB_USER=${DB_USER:-"idrc"}
|
||||||
DB_PASSWORD=${DB_PASSWORD:-"xx_db_password"}
|
DB_PASSWORD=${DB_PASSWORD:-"a8aa283c1b3ca0bdfe1d2669dd400f3d"}
|
||||||
|
|
||||||
|
|
||||||
# 导出变量用于envsubst
|
# 导出变量用于envsubst
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ class DbfToPostgresPipeline(BasePipeline):
|
||||||
if len(batch_data) >= batch_size:
|
if len(batch_data) >= batch_size:
|
||||||
# todo:本地调试先注释掉
|
# todo:本地调试先注释掉
|
||||||
self.db.execute_batch(
|
self.db.execute_batch(
|
||||||
"INSERT INTO target_table (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)",
|
"INSERT INTO current_states (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)",
|
||||||
batch_data
|
batch_data
|
||||||
)
|
)
|
||||||
# todo:本地调试先注释掉
|
# todo:本地调试先注释掉
|
||||||
|
|
@ -170,7 +170,7 @@ class DbfToPostgresPipeline(BasePipeline):
|
||||||
if batch_data:
|
if batch_data:
|
||||||
# todo:本地调试先注释掉
|
# todo:本地调试先注释掉
|
||||||
self.db.execute_batch(
|
self.db.execute_batch(
|
||||||
"INSERT INTO target_table (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)",
|
"INSERT INTO current_states (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)",
|
||||||
batch_data
|
batch_data
|
||||||
)
|
)
|
||||||
# todo:本地调试先注释掉
|
# todo:本地调试先注释掉
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user