Remove useless constant values (#2721)

Signed-off-by: 李龙峰 <lilongfeng@inspur.com>
This commit is contained in:
lilongfeng 2023-09-12 17:51:00 +08:00 committed by GitHub
parent 143b8b2ad2
commit 8fb8b7337a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 25 deletions

View File

@ -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
DefaultPieceChanSize = 16
DefaultPieceQueueExponent = 10
DefaultPieceDispatcherRandomRatio = 0.1
DefaultObjectMaxReplicas = 3
)