From 21ff75232213005812069f257862c1dba46c30d2 Mon Sep 17 00:00:00 2001 From: fumiama Date: Tue, 26 Oct 2021 13:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20=E7=A6=BB=E6=95=A3?= =?UTF-8?q?=E5=8C=96=E5=8A=A0=E8=BD=BD=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_diana/data/text.go | 3 ++- plugin_manager/timer/timer.go | 3 ++- plugin_reborn/load.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin_diana/data/text.go b/plugin_diana/data/text.go index 82ec18da..16232f87 100644 --- a/plugin_diana/data/text.go +++ b/plugin_diana/data/text.go @@ -5,6 +5,7 @@ import ( "crypto/md5" "errors" "io" + "math/rand" "net/http" "os" "sync" @@ -34,7 +35,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err) diff --git a/plugin_manager/timer/timer.go b/plugin_manager/timer/timer.go index 6007c66b..aab01fa4 100644 --- a/plugin_manager/timer/timer.go +++ b/plugin_manager/timer/timer.go @@ -4,6 +4,7 @@ package timer import ( "fmt" "io" + "math/rand" "os" "strconv" "strings" @@ -41,7 +42,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err) diff --git a/plugin_reborn/load.go b/plugin_reborn/load.go index 94a1a1f0..4c9495dc 100644 --- a/plugin_reborn/load.go +++ b/plugin_reborn/load.go @@ -3,6 +3,7 @@ package reborn import ( "encoding/json" "io" + "math/rand" "net/http" "os" "time" @@ -30,7 +31,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err)