marshal time.Duration as json string

This commit is contained in:
glidea
2025-05-06 16:00:59 +08:00
parent 8f32e427d4
commit 278cb662de
8 changed files with 86 additions and 26 deletions

View File

@@ -99,9 +99,9 @@ func (c *Config) Validate() error {
func (c *Config) From(app *config.App) {
*c = Config{
Dir: app.Storage.Dir,
Retention: app.Storage.Feed.Retention,
BlockDuration: app.Storage.Feed.BlockDuration,
FlushInterval: app.Storage.Feed.FlushInterval,
Retention: time.Duration(app.Storage.Feed.Retention),
BlockDuration: time.Duration(app.Storage.Feed.BlockDuration),
FlushInterval: time.Duration(app.Storage.Feed.FlushInterval),
EmbeddingLLM: app.Storage.Feed.EmbeddingLLM,
}
}