Commit e2c5c090 authored by szh's avatar szh

新增Lock.file 运维操作时正常操作节点运行

parent 96e2e692
......@@ -23,6 +23,7 @@ import (
"strings"
"sync"
"time"
"chain33-pai/pkg/file"
)
var tlog = log.New("pkg", "app")
......@@ -135,12 +136,12 @@ func StrFilter(str []string, filter string) (res []string) {
//corn job for collecting chain33 process info
func BityuanJob(ticker *time.Ticker) {
NodeError = getWalletInfo()
//NodeError = getWalletInfo()
for {
select {
case <-ticker.C:
BityuanFlag.Lock.Lock()
if !BityuanFlag.Flag { //有更新,重置等节点重启操作时 禁止运行,防止冲突
if !BityuanFlag.Flag && file.CheckNotExist("Lock.file"){ //有更新,重置等节点重启操作时 禁止运行,防止冲突
//节点未启动 会调用auto启动
NodeError = getWalletInfo()
//解锁钱包
......
......@@ -56,3 +56,4 @@ func GetLocalUUID() string {
}
return ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment