From b1bbc8746a0c1ce908a74a3efa831b4c4b2b3f28 Mon Sep 17 00:00:00 2001 From: make123 Date: Tue, 10 Sep 2024 16:57:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E7=BC=A9=E7=9F=AD=E5=8A=A0?= =?UTF-8?q?=E9=94=81=E4=BF=9D=E6=8A=A4=E7=9A=84=E8=8C=83=E5=9B=B4=20#6819?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/flow/utils/script_template.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbm-ui/backend/flow/utils/script_template.py b/dbm-ui/backend/flow/utils/script_template.py index abedd5855e..9e8dfb5e9e 100644 --- a/dbm-ui/backend/flow/utils/script_template.py +++ b/dbm-ui/backend/flow/utils/script_template.py @@ -36,11 +36,13 @@ cp /data/install/dbactuator /data/install/dbactuator-{{uid}} fi fi - +) 200>"$lock_file" + rm -f "$lock_file" + cd /data/install/dbactuator-{{uid}} chmod +x dbactuator ./dbactuator {{db_type}} {{action}} --uid {{uid}} --root_id {{root_id}} --node_id {{node_id}} --version_id {{version_id}} -c {{non_sensitive_payload}} --payload $1 -) 200>"$lock_file" + """ # noqa # riak actuator 执行的shell命令,引入文件MD5值的比较,避免并发执行过程中输出错误信息,误导日志的捕捉