fix: wire import chapter ingestion, live task polling, a11y labels, notification user targeting
- NewBookImporter now takes *Store instead of raw *minio.Client (same package access) - Runner Dependencies gains ChapterIngester interface; storeImportedChapters no-op removed - store.IngestChapters is now actually called after PDF/EPUB extraction - BookImport and ChapterIngester wired in runner main.go - CreateImportTask interface gains initiatorUserID param; threaded through store/asynq/handler - domain.ImportTask gains InitiatorUserID field; parseImportTask populates it - Runner notifies initiator (falls back to 'admin' when empty) - UI: import task list polls every 3s while any task is pending/running - UI: label[for] + input[id] fix for a11y warnings in admin import page
This commit is contained in:
@@ -88,8 +88,8 @@ func (p *Producer) CreateTranslationTask(ctx context.Context, slug string, chapt
|
||||
}
|
||||
|
||||
// CreateImportTask creates a PocketBase record then enqueues an Asynq job for PDF/EPUB import.
|
||||
func (p *Producer) CreateImportTask(ctx context.Context, slug, title, fileType, objectKey string) (string, error) {
|
||||
id, err := p.pb.CreateImportTask(ctx, slug, title, fileType, objectKey)
|
||||
func (p *Producer) CreateImportTask(ctx context.Context, slug, title, fileType, objectKey, initiatorUserID string) (string, error) {
|
||||
id, err := p.pb.CreateImportTask(ctx, slug, title, fileType, objectKey, initiatorUserID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user