feat(PROJ-58): Indexierung + OCR optional als Cron-Batch statt Dauerbetrieb
Neues config.yml-Feld batch_mode (index/ocr, Default false = unverändertes Verhalten). Bei batch_mode:true verarbeiten neue Cron-Jobs (index-pending, ocr-reprocess) die Backlogs in größeren Abständen statt sofort bei jedem Mail-Import, um Schreiblast auf der Festplatte zu glätten. Zeiten in /etc/cron.d/archivmail frei anpassbar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
76655f78a2
commit
fae274f930
@@ -51,6 +51,13 @@ type OCRConfig struct {
|
||||
// Wrap-around windows are supported, e.g. [22, 6] = paused 22:00–06:00.
|
||||
// nil / unset = never pause (legacy behaviour: process immediately).
|
||||
PausedHours *[2]int `yaml:"paused_hours,omitempty"`
|
||||
// BatchMode (PROJ-58): when true, the continuous OCR worker is NOT started
|
||||
// at daemon boot and the upload path does not submit jobs to the in-memory
|
||||
// queue. OCR then runs only via the cron batch command
|
||||
// (`archivmail ocr-reprocess --status pending`). New mails stay
|
||||
// ocr_status='pending' in the DB until the next cron run.
|
||||
// false (default) = legacy behaviour (immediate, continuous processing).
|
||||
BatchMode bool `yaml:"batch_mode"`
|
||||
}
|
||||
|
||||
// IMAPSchedulerConfig holds settings for the automatic IMAP sync scheduler (PROJ-56).
|
||||
@@ -157,6 +164,13 @@ type IndexConfig struct {
|
||||
BatchSize int `yaml:"batch_size"`
|
||||
AsyncQueueSize int `yaml:"async_queue_size"`
|
||||
ManticoreDSN string `yaml:"manticore_dsn"` // DSN for Manticore backend (default: "manticore@tcp(127.0.0.1:9306)/?charset=utf8mb4")
|
||||
// BatchMode (PROJ-58): when true, the continuous index worker is NOT started
|
||||
// at daemon boot and the upload path does not submit documents to the
|
||||
// in-memory queue. Indexing then runs only via the cron batch command
|
||||
// (`archivmail index-pending`). New mails stay indexed_at IS NULL in the DB
|
||||
// until the next cron run.
|
||||
// false (default) = legacy behaviour (immediate, continuous indexing).
|
||||
BatchMode bool `yaml:"batch_mode"`
|
||||
}
|
||||
|
||||
// DefaultAuditLogPath is the default location of the append-only JSON-Lines
|
||||
|
||||
Reference in New Issue
Block a user