refactor: standardize article header layout in UI and increase worker pool capacity

This commit is contained in:
2026-08-25 23:01:40 -07:00
parent 83c70cc3b9
commit 9bc3423009
6 changed files with 175 additions and 85 deletions
+3
View File
@@ -60,6 +60,9 @@ func (e *Evaluator) resolveField(field string, entry models.FeedEntry) interface
return entry.URL
case "content", "raw_content", "rss_content":
var parts []string
if entry.Title != "" {
parts = append(parts, entry.Title)
}
if entry.Content != "" {
parts = append(parts, entry.Content)
}
+14 -2
View File
@@ -77,10 +77,22 @@ func (p *Pool) Stop() {
}
func (p *Pool) Dispatch(ctx context.Context, action models.RuleAction, entry models.FeedEntry, depth int) {
task := Task{Action: action, Entry: entry, Depth: depth}
select {
case p.queue <- Task{Action: action, Entry: entry, Depth: depth}:
case <-ctx.Done():
return
case p.queue <- task:
return
default:
p.log.Warn("Worker pool queue full, task dropped",
}
// If queue is full, wait up to 5 seconds for a slot before warning
select {
case <-ctx.Done():
return
case p.queue <- task:
case <-time.After(5 * time.Second):
p.log.Warn("Worker pool queue full, task dropped after timeout",
zap.String("action", action.Type),
zap.String("entry_id", entry.ID),
)