mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +00:00
feat(dashboard): add workflow tasks monitoring and stopping to team dashboard (#489)
* feat(dashboard): add workflow tasks monitoring and stopping to team dashboard * fix(asset): retain workflow tasks on asset purge and mark active tasks as failed * style(webui): add edge padding to audit logs and workflow tasks tables * fix(workflow): atomically update asset status to failed when task is stopped * fix(workflow): propagate cancellation errors, guard concurrent task stop, and localize UI * docs(changelog): keep only added log for workflow tasks dashboard * test(provider): mock upstream catalog api calls using saved fixtures * feat(dashboard): show file name, size, and project name in workflow tasks list
This commit is contained in:
@@ -1419,6 +1419,17 @@ export class AssetService {
|
||||
logger.warn({ taskId: task.id, err }, 'Failed to cancel workflow task during purge')
|
||||
}
|
||||
}
|
||||
|
||||
await this.prismaClient.workflowTask.updateMany({
|
||||
where: {
|
||||
assetId: { in: affectedIds },
|
||||
status: { in: [WorkflowTaskStatus.pending, WorkflowTaskStatus.processing] },
|
||||
},
|
||||
data: {
|
||||
status: WorkflowTaskStatus.failed,
|
||||
output: { error: 'Asset was purged' },
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1518,8 +1529,15 @@ export class AssetService {
|
||||
}
|
||||
}
|
||||
|
||||
await this.prismaClient.workflowTask.deleteMany({
|
||||
where: { assetId: { in: pendingAssetIds } },
|
||||
await this.prismaClient.workflowTask.updateMany({
|
||||
where: {
|
||||
assetId: { in: pendingAssetIds },
|
||||
status: { in: [WorkflowTaskStatus.pending, WorkflowTaskStatus.processing] },
|
||||
},
|
||||
data: {
|
||||
status: WorkflowTaskStatus.failed,
|
||||
output: { error: 'Asset was purged' },
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user