chore: update app generation workflow
Desktop Client Build / Resolve Build Metadata (push) Successful in 26s
Frontend CI / Frontend (push) Successful in 2m58s
Backend CI / Backend (push) Successful in 16m11s
Desktop Client Build / Build Desktop Client (push) Successful in 24m1s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 28s
Desktop Client Build / Resolve Build Metadata (push) Successful in 26s
Frontend CI / Frontend (push) Successful in 2m58s
Backend CI / Backend (push) Successful in 16m11s
Desktop Client Build / Build Desktop Client (push) Successful in 24m1s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 28s
This commit is contained in:
@@ -545,6 +545,30 @@ func (s *TemplateService) executeGeneration(ctx context.Context, job generationJ
|
||||
quotaRepo := repository.NewQuotaRepository(tx)
|
||||
auditTx := repository.NewAuditRepository(tx)
|
||||
|
||||
if err := EnsureGenerationArticleWritable(ctx, tx, job.ArticleID, job.TenantID); err != nil {
|
||||
if IsGenerationArticleUnavailable(err) {
|
||||
rollbackGenerationTx(tx)
|
||||
if cleanupErr := HandleGenerationTaskArticleUnavailable(ctx, s.pool, s.cache, ClaimedGenerationTask{
|
||||
ID: job.TaskID,
|
||||
TenantID: job.TenantID,
|
||||
OperatorID: job.OperatorID,
|
||||
ArticleID: job.ArticleID,
|
||||
QuotaReservationID: job.ReservationID,
|
||||
TaskType: "template",
|
||||
InputParams: cloneInputParams(job.Params),
|
||||
}, "template", false); cleanupErr != nil && s.logger != nil {
|
||||
s.logger.Warn("template generation article unavailable cleanup failed",
|
||||
zap.Error(cleanupErr),
|
||||
zap.Int64("task_id", job.TaskID),
|
||||
zap.Int64("article_id", job.ArticleID),
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
failWithRollback("persist_article_status", err)
|
||||
return
|
||||
}
|
||||
|
||||
versionID, err := articleRepo.CreateArticleVersion(ctx, repository.CreateArticleVersionInput{
|
||||
ArticleID: job.ArticleID,
|
||||
Title: title,
|
||||
|
||||
Reference in New Issue
Block a user