feat: M0-10 — audit log for manual task retry
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s

This commit is contained in:
WangDL 2026-05-23 20:08:54 +08:00
parent 7a31bd3702
commit d88233fd5b

View File

@ -71,6 +71,8 @@ export class AdminEventsController {
const job = await q.getJob(jobId);
if (!job) return { error: 'Job not found' };
await job.retry();
// Audit retry operation
await this.prisma.adminAuditLog.create({ data: { adminUserId: 'system', action: 'TASK_RETRY', resourceType: 'TaskLog', resourceId: jobId } }).catch(() => {});
// Audit
await this.prisma.taskLog.updateMany({ where: { jobId }, data: { status: 'retried', updatedAt: new Date() } }).catch(() => {});
return { success: true };