From 8fb8b7337a003967965e63134545c1a65a40d24d Mon Sep 17 00:00:00 2001 From: lilongfeng Date: Tue, 12 Sep 2023 17:51:00 +0800 Subject: [PATCH] Remove useless constant values (#2721) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李龙峰 --- client/config/constants.go | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/client/config/constants.go b/client/config/constants.go index 4ad3074ce..1f2f5f25b 100644 --- a/client/config/constants.go +++ b/client/config/constants.go @@ -24,22 +24,6 @@ import ( "d7y.io/dragonfly/v2/pkg/unit" ) -// Reason of backing to source. -const ( - BackSourceReasonNone = 0 - BackSourceReasonRegisterFail = 1 - BackSourceReasonMd5NotMatch = 2 - BackSourceReasonDownloadError = 3 - BackSourceReasonNoSpace = 4 - BackSourceReasonInitError = 5 - BackSourceReasonWriteError = 6 - BackSourceReasonHostSysError = 7 - BackSourceReasonNodeEmpty = 8 - BackSourceReasonSourceError = 10 - BackSourceReasonUserSpecified = 100 - ForceNotBackSourceAddition = 1000 -) - // Download limit. const ( DefaultPerPeerDownloadLimit = 512 * unit.MB @@ -50,21 +34,14 @@ const ( // Others. const ( - DefaultTimestampFormat = "2006-01-02 15:04:05" - SchemaHTTP = "http" - DefaultTaskExpireTime = 6 * time.Hour DefaultGCInterval = 1 * time.Minute DefaultDaemonAliveTime = 5 * time.Minute DefaultScheduleTimeout = 5 * time.Minute - DefaultDownloadTimeout = 5 * time.Minute - DefaultSchedulerSchema = "http" - DefaultSchedulerIP = "127.0.0.1" - DefaultSchedulerPort = 8002 + DefaultSchedulerIP = "127.0.0.1" + DefaultSchedulerPort = 8002 - DefaultPieceChanSize = 16 - DefaultPieceQueueExponent = 10 DefaultPieceDispatcherRandomRatio = 0.1 DefaultObjectMaxReplicas = 3 )