feat(generation): resume manual summary jobs
This commit is contained in:
@ -111,7 +111,11 @@ func (u *useCase) Generate(ctx context.Context, userID string) (Result, error) {
|
||||
if err != nil {
|
||||
return Result{}, fmt.Errorf("load generation input: %w", err)
|
||||
}
|
||||
out := GenerationOutcome{ID: NewID(), Language: input.Language, RankingMode: input.RankingMode, GlobalLimit: input.GlobalLimit, CreatedAt: u.Clock(), SourceStats: []SourceStat{}}
|
||||
id := models.GenerationJobID(ctx)
|
||||
if id == "" {
|
||||
id = NewID()
|
||||
}
|
||||
out := GenerationOutcome{ID: id, Language: input.Language, RankingMode: input.RankingMode, GlobalLimit: input.GlobalLimit, CreatedAt: u.Clock(), SourceStats: []SourceStat{}}
|
||||
resolved := ResolvedSummary{Summarizer: u.Summarizer}
|
||||
finish := func(status, code, content string) (Result, error) {
|
||||
out.Status = status
|
||||
|
||||
Reference in New Issue
Block a user