timeout values now in config

This commit is contained in:
2026-05-03 11:19:20 -06:00
parent d309b90953
commit 53ee2281bc
3 changed files with 20 additions and 8 deletions
+8 -3
View File
@@ -167,7 +167,12 @@ type AmConfig struct {
} `yaml:"posting"`
Tuning struct {
WorkerTasks int `yaml:"workerTasks"`
Queues struct {
Timeouts struct {
HttpRead int `yaml:"httpRead"`
HttpWrite int `yaml:"httpWrite"`
HttpIdle int `yaml:"httpIdle"`
} `yaml:"timeouts"`
Queues struct {
AuditWrites int `yaml:"auditWrites"`
ContextRecycle int `yaml:"contextRecycle"`
EmailRecycle int `yaml:"emailRecycle"`
@@ -200,7 +205,7 @@ func (c *AmConfig) ExPath(path string) string {
return filepath.Join(c.baseDir, path)
}
// AmConfigComputed is the configuration values which are "computed" based only on values in AmConfig.
// AmConfigComputed is the configuration values which are "computed" based only on values in AmConfig and CommandLine.
type AmConfigComputed struct {
DebugMode bool // are we in debug mode?
LogLevel string // the logging level
@@ -321,7 +326,7 @@ func overlayStructValue(dest, loaded, defaults reflect.Value) {
}
} else {
// if we see this message, this function needs more work
log.Errorf("*** unable to deal with field %s of type %s", structField.Name, typ.Name())
log.Fatalf("*** unable to deal with field %s of type %s", structField.Name, typ.Name())
}
}
}
+4
View File
@@ -91,6 +91,10 @@ posting:
- "image/png"
tuning:
workerTasks: 4
timeouts:
httpRead: 30
httpWrite: 30
httpIdle: 120
queues:
auditWrites: 16
contextRecycle: 16