feat: change task and peer ttl (#984)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
0868c7a6f7
commit
54d6542aa6
|
|
@ -60,7 +60,7 @@ const (
|
||||||
ServerPortLowerLimit = 15000
|
ServerPortLowerLimit = 15000
|
||||||
ServerPortUpperLimit = 65000
|
ServerPortUpperLimit = 65000
|
||||||
|
|
||||||
DefaultTaskExpireTime = 3 * time.Minute
|
DefaultTaskExpireTime = 6 * time.Hour
|
||||||
DefaultGCInterval = 1 * time.Minute
|
DefaultGCInterval = 1 * time.Minute
|
||||||
DefaultDaemonAliveTime = 5 * time.Minute
|
DefaultDaemonAliveTime = 5 * time.Minute
|
||||||
DefaultScheduleTimeout = 5 * time.Minute
|
DefaultScheduleTimeout = 5 * time.Minute
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ upload:
|
||||||
storage:
|
storage:
|
||||||
# task data expire time
|
# task data expire time
|
||||||
# when there is no access to a task data, this task will be gc.
|
# when there is no access to a task data, this task will be gc.
|
||||||
taskExpireTime: 3m0s
|
taskExpireTime: 6h
|
||||||
# storage strategy when process task data
|
# storage strategy when process task data
|
||||||
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
|
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
|
||||||
# the download file in date directory will be the peer data for uploading to other peers
|
# the download file in date directory will be the peer data for uploading to other peers
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,13 @@ scheduler:
|
||||||
# gc metadata configuration
|
# gc metadata configuration
|
||||||
gc:
|
gc:
|
||||||
# peerGCInterval peer's gc interval
|
# peerGCInterval peer's gc interval
|
||||||
peerGCInterval: 1m
|
peerGCInterval: 10m
|
||||||
# peerTTL peer's TTL duration
|
# peerTTL peer's TTL duration
|
||||||
peerTTL: 5m
|
peerTTL: 24h
|
||||||
# taskGCInterval task's gc interval
|
# taskGCInterval task's gc interval
|
||||||
taskGCInterval: 1m
|
taskGCInterval: 10m
|
||||||
# taskTTL task's TTL duration
|
# taskTTL task's TTL duration
|
||||||
taskTTL: 10m
|
taskTTL: 24h
|
||||||
|
|
||||||
# dynamic data configuration
|
# dynamic data configuration
|
||||||
dynConfig:
|
dynConfig:
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ upload:
|
||||||
storage:
|
storage:
|
||||||
# task data 过期时间
|
# task data 过期时间
|
||||||
# 超过指定时间没有访问之后,缓存数据将会被清理
|
# 超过指定时间没有访问之后,缓存数据将会被清理
|
||||||
taskExpireTime: 3m0s
|
taskExpireTime: 6h
|
||||||
# storage strategy when process task data
|
# storage strategy when process task data
|
||||||
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
|
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
|
||||||
# the download file in date directory will be the peer data for uploading to other peers
|
# the download file in date directory will be the peer data for uploading to other peers
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,13 @@ scheduler:
|
||||||
# 数据回收策略
|
# 数据回收策略
|
||||||
gc:
|
gc:
|
||||||
# peer 的回收间隔
|
# peer 的回收间隔
|
||||||
peerGCInterval: 1m
|
peerGCInterval: 10m
|
||||||
# 不活跃的 peer 的存活时间
|
# 不活跃的 peer 的存活时间
|
||||||
peerTTL: 5m
|
peerTTL: 24h
|
||||||
# task 的回收间隔
|
# task 的回收间隔
|
||||||
taskGCInterval: 1m
|
taskGCInterval: 10m
|
||||||
# 不活跃的 task 的存活时间
|
# 不活跃的 task 的存活时间
|
||||||
taskTTL: 10m
|
taskTTL: 24h
|
||||||
|
|
||||||
# 动态数据配置
|
# 动态数据配置
|
||||||
dynConfig:
|
dynConfig:
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,10 @@ func New() *Config {
|
||||||
RetryLimit: 10,
|
RetryLimit: 10,
|
||||||
RetryInterval: 1 * time.Second,
|
RetryInterval: 1 * time.Second,
|
||||||
GC: &GCConfig{
|
GC: &GCConfig{
|
||||||
PeerGCInterval: 1 * time.Minute,
|
PeerGCInterval: 10 * time.Minute,
|
||||||
PeerTTL: 5 * time.Minute,
|
PeerTTL: 24 * time.Hour,
|
||||||
TaskGCInterval: 1 * time.Minute,
|
TaskGCInterval: 10 * time.Minute,
|
||||||
TaskTTL: 10 * time.Minute,
|
TaskTTL: 24 * time.Hour,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
DynConfig: &DynConfig{
|
DynConfig: &DynConfig{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue