x
This commit is contained in:
+10
-10
@@ -340,11 +340,11 @@ func (f *Factory) Push(msg map[string]string) map[string]string {
|
||||
|
||||
func (f *Factory) SetReplyHandler(function func(map[string]interface{}) string) {
|
||||
f.reply = func(m map[string]interface{}) string {
|
||||
if f.uuid != "" {
|
||||
mutex := GetMutex(f.uuid)
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
}
|
||||
// if f.uuid != "" {
|
||||
// mutex := GetMutex(f.uuid)
|
||||
// mutex.Lock()
|
||||
// defer mutex.Unlock()
|
||||
// }
|
||||
defer func() {
|
||||
err := recover()
|
||||
if err != nil {
|
||||
@@ -357,11 +357,11 @@ func (f *Factory) SetReplyHandler(function func(map[string]interface{}) string)
|
||||
|
||||
func (f *Factory) SetActionHandler(function func(map[string]interface{}) string) {
|
||||
f.action = func(m map[string]interface{}) string {
|
||||
if f.uuid != "" {
|
||||
mutex := GetMutex(f.uuid)
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
}
|
||||
// if f.uuid != "" {
|
||||
// mutex := GetMutex(f.uuid)
|
||||
// mutex.Lock()
|
||||
// defer mutex.Unlock()
|
||||
// }
|
||||
defer func() {
|
||||
err := recover()
|
||||
if err != nil {
|
||||
|
||||
@@ -31,7 +31,7 @@ func initNodePlugins() {
|
||||
root := strings.ReplaceAll(utils.ExecPath+"/plugins", "\\", "/")
|
||||
plugins := []string{root}
|
||||
os.Mkdir(root, 0755)
|
||||
fmt.Println("root", root)
|
||||
// fmt.Println("root", root)
|
||||
|
||||
files, _ := ioutil.ReadDir(root)
|
||||
for _, file := range files {
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ func initPlugins() {
|
||||
}
|
||||
}
|
||||
return &storage.Final{
|
||||
Error: errors.New("非法操作!"),
|
||||
Error: errors.New("安装失败!!!"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user