Skip to content

Commit

Permalink
remove NOOPEN option
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Mar 2, 2024
1 parent 8fa1c19 commit 48c0f85
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
2 changes: 0 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ advanced:
debug-log: false
# 是否记录 socket.io 流的日志 (仅在打开 debug-log 后才会输出到标准输出)
socket-io-log: false
# 是否仅从主服务器下载文件
noopen: false
# 跳过文件哈希值校验
no-heavy-check: true
# 不删除未使用的文件对象 **注意⚠️: 该选项打开后磁盘使用率会随时间增长**
Expand Down
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ func (cr *Cluster) syncFiles(ctx context.Context, files []FileInfo, heavyCheck b

var stats syncStats
stats.pg = pg
stats.noOpen = config.Advanced.NoOpen || syncCfg.Source == "center"
stats.noOpen = syncCfg.Source == "center"
stats.slots = limited.NewBufSlots(syncCfg.Concurrency)
stats.totalFiles = totalFiles
for _, f := range missing {
Expand Down
11 changes: 0 additions & 11 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ type UserItem struct {
type AdvancedConfig struct {
DebugLog bool `yaml:"debug-log"`
SocketIOLog bool `yaml:"socket-io-log"`
NoOpen bool `yaml:"noopen"`
NoHeavyCheck bool `yaml:"no-heavy-check"`
NoGC bool `yaml:"no-gc"`
HeavyCheckInterval int `yaml:"heavy-check-interval"`
Expand Down Expand Up @@ -210,7 +209,6 @@ var defaultConfig = Config{

Advanced: AdvancedConfig{
DebugLog: false,
NoOpen: false,
NoHeavyCheck: false,
NoGC: false,
HeavyCheckInterval: 120,
Expand Down Expand Up @@ -320,9 +318,6 @@ func migrateConfig(data []byte, config *Config) {
if v, ok := oldConfig["exit-when-disconnected"].(bool); ok {
config.Advanced.ExitWhenDisconnected = v
}
if v, ok := oldConfig["noopen"].(bool); ok {
config.Advanced.NoOpen = v
}
if v, ok := oldConfig["no-heavy-check"].(bool); ok {
config.Advanced.NoHeavyCheck = v
}
Expand Down Expand Up @@ -460,12 +455,6 @@ func readConfig() (config Config) {
if byoc := os.Getenv("CLUSTER_BYOC"); byoc != "" {
config.Byoc = byoc == "true"
}
switch noopen := os.Getenv("FORCE_NOOPEN"); noopen {
case "true":
config.Advanced.NoOpen = true
case "false":
config.Advanced.NoOpen = false
}
return
}

Expand Down
1 change: 0 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ webdav-users:
advanced:
debug-log: false
socket-io-log: false
noopen: false
no-heavy-check: false
no-gc: false
heavy-check-interval: 120
Expand Down

0 comments on commit 48c0f85

Please sign in to comment.