feat(web): Processor port + in-flight ProcessingSet on App
Add the seam for immediate web-triggered summarization. Processor is the optional single-video summarize port (nil = queue-only, unchanged behaviour); ProcessingSet is an ephemeral, concurrency-safe set of in-flight (user,video) ids so a status endpoint can show progress until the summary lands. State is deliberately in-memory only — the DB holds the durable truth across restarts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,13 @@ type App struct {
|
||||
// Secrets removes a user's OAuth tokens on disconnect / delete-account. The
|
||||
// account routes require it; cmd/tapir wires the file-backed store.
|
||||
Secrets SecretRemover
|
||||
// Processor, when non-nil, summarizes a queued video immediately in a
|
||||
// background goroutine (the "Summarize" button kicks it off). Nil = queue-only:
|
||||
// the button flips the DB flag and the next `tapir run` does the work.
|
||||
Processor Processor
|
||||
// Processing tracks in-flight immediate summarizations so the status endpoint
|
||||
// shows the animation until the summary lands. The zero value is ready to use.
|
||||
Processing ProcessingSet
|
||||
}
|
||||
|
||||
func (a *App) logger() *slog.Logger {
|
||||
|
||||
Reference in New Issue
Block a user