mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-02 15:50:27 +00:00
fix timeout defaults
This commit is contained in:
parent
068af273fa
commit
2158e81010
2 changed files with 5 additions and 5 deletions
|
@ -11,8 +11,8 @@ type BackgroundTask struct {
|
||||||
Fn func(context.Context)
|
Fn func(context.Context)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bg *BackgroundTask) Name() string {
|
func (tsk *BackgroundTask) Name() string {
|
||||||
return bg.name
|
return tsk.name
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTask(name string, interval time.Duration, fn func(context.Context)) *BackgroundTask {
|
func NewTask(name string, interval time.Duration, fn func(context.Context)) *BackgroundTask {
|
||||||
|
|
|
@ -43,9 +43,9 @@ type WebConfig struct {
|
||||||
Port string `yaml:"port" conf:"default:7745"`
|
Port string `yaml:"port" conf:"default:7745"`
|
||||||
Host string `yaml:"host"`
|
Host string `yaml:"host"`
|
||||||
MaxUploadSize int64 `yaml:"max_file_upload" conf:"default:10"`
|
MaxUploadSize int64 `yaml:"max_file_upload" conf:"default:10"`
|
||||||
ReadTimeout time.Duration `yaml:"read_timeout" conf:"default:10"`
|
ReadTimeout time.Duration `yaml:"read_timeout" conf:"default:10s"`
|
||||||
WriteTimeout time.Duration `yaml:"write_timeout" conf:"default:10"`
|
WriteTimeout time.Duration `yaml:"write_timeout" conf:"default:10s"`
|
||||||
IdleTimeout time.Duration `yaml:"idle_timeout" conf:"default:30"`
|
IdleTimeout time.Duration `yaml:"idle_timeout" conf:"default:30s"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// New parses the CLI/Config file and returns a Config struct. If the file argument is an empty string, the
|
// New parses the CLI/Config file and returns a Config struct. If the file argument is an empty string, the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue