ADInfo changing
This commit is contained in:
parent
1283154f32
commit
7ad9135063
31
config.go
31
config.go
|
@ -99,18 +99,9 @@ func (proxies *YamlProxies) MarshalYAML() (interface{}, error) {
|
||||||
return content, nil
|
return content, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config 任务加载的默认配置
|
// ADInfo ad 的一些属性,基础信息等
|
||||||
type Config struct {
|
type ADInfo struct {
|
||||||
// Session int `yaml:"session"`
|
|
||||||
Mode int `yaml:"mode"`
|
|
||||||
Proxies *YamlProxies `yaml:"proxies"`
|
|
||||||
Retry int `yaml:"retry"`
|
|
||||||
Priority int `yaml:"priority"`
|
Priority int `yaml:"priority"`
|
||||||
Curls YamlCurls `yaml:"curls"`
|
|
||||||
|
|
||||||
Crontab string `yaml:"crontab"`
|
|
||||||
ITask string `yaml:"task"`
|
|
||||||
|
|
||||||
Device string `yaml:"device"`
|
Device string `yaml:"device"`
|
||||||
Platform string `yaml:"platform"`
|
Platform string `yaml:"platform"`
|
||||||
AreaCC string `yaml:"area_cc"`
|
AreaCC string `yaml:"area_cc"`
|
||||||
|
@ -120,15 +111,30 @@ type Config struct {
|
||||||
CatchAccountID int `yaml:"catch_account_id"`
|
CatchAccountID int `yaml:"catch_account_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Config 任务加载的默认配置
|
||||||
|
type Config struct {
|
||||||
|
// Session int `yaml:"session"`
|
||||||
|
Mode int `yaml:"mode"`
|
||||||
|
Proxies *YamlProxies `yaml:"proxies"`
|
||||||
|
Retry int `yaml:"retry"`
|
||||||
|
|
||||||
|
Curls YamlCurls `yaml:"curls"`
|
||||||
|
|
||||||
|
Crontab string `yaml:"crontab"`
|
||||||
|
ITask string `yaml:"task"`
|
||||||
|
|
||||||
|
ADInfo `yaml:",inline"`
|
||||||
|
}
|
||||||
|
|
||||||
// newDefaultConfig create a default config
|
// newDefaultConfig create a default config
|
||||||
func newDefaultConfig() *Config {
|
func newDefaultConfig() *Config {
|
||||||
conf := &Config{
|
conf := &Config{
|
||||||
// Session: 1,
|
// Session: 1,
|
||||||
Mode: 0,
|
Mode: 0,
|
||||||
Retry: 0,
|
Retry: 0,
|
||||||
Priority: 10000,
|
|
||||||
Crontab: "",
|
Crontab: "",
|
||||||
|
|
||||||
|
ADInfo: ADInfo{
|
||||||
Device: "",
|
Device: "",
|
||||||
Platform: "",
|
Platform: "",
|
||||||
AreaCC: "",
|
AreaCC: "",
|
||||||
|
@ -136,6 +142,7 @@ func newDefaultConfig() *Config {
|
||||||
Media: -1,
|
Media: -1,
|
||||||
SpiderID: -1,
|
SpiderID: -1,
|
||||||
CatchAccountID: -1,
|
CatchAccountID: -1,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return conf
|
return conf
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user