feat: externalize filter configuration and add global structured logging and job reprocessing functionality

This commit is contained in:
2026-08-14 15:27:50 -07:00
parent 890469fed8
commit 5510e3ac82
17 changed files with 257 additions and 80 deletions
+28
View File
@@ -0,0 +1,28 @@
package config
import (
"fmt"
"os"
"github.com/hireme/hireme/internal/filter"
"gopkg.in/yaml.v3"
)
type FilterConfig struct {
HardKeywords []string `yaml:"hard_keywords"`
ScoringWeights []filter.KeywordWeight `yaml:"scoring_weights"`
}
func LoadFilterConfig(path string) (*FilterConfig, error) {
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("failed to read filter config file %s: %w", path, err)
}
var cfg FilterConfig
if err := yaml.Unmarshal(data, &cfg); err != nil {
return nil, fmt.Errorf("failed to unmarshal filter config: %w", err)
}
return &cfg, nil
}