fix timeout defaults

This commit is contained in:
Hayden 2024-03-01 14:26:00 -06:00
parent 068af273fa
commit 2158e81010
No known key found for this signature in database
GPG key ID: 17CF79474E257545
2 changed files with 5 additions and 5 deletions

View file

@ -11,8 +11,8 @@ type BackgroundTask struct {
Fn func(context.Context)
}
func (bg *BackgroundTask) Name() string {
return bg.name
func (tsk *BackgroundTask) Name() string {
return tsk.name
}
func NewTask(name string, interval time.Duration, fn func(context.Context)) *BackgroundTask {

View file

@ -43,9 +43,9 @@ type WebConfig struct {
Port string `yaml:"port" conf:"default:7745"`
Host string `yaml:"host"`
MaxUploadSize int64 `yaml:"max_file_upload" conf:"default:10"`
ReadTimeout time.Duration `yaml:"read_timeout" conf:"default:10"`
WriteTimeout time.Duration `yaml:"write_timeout" conf:"default:10"`
IdleTimeout time.Duration `yaml:"idle_timeout" conf:"default:30"`
ReadTimeout time.Duration `yaml:"read_timeout" conf:"default:10s"`
WriteTimeout time.Duration `yaml:"write_timeout" conf:"default:10s"`
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