feat: M0-10 — audit log for manual task retry
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
This commit is contained in:
parent
7a31bd3702
commit
d88233fd5b
@ -71,6 +71,8 @@ export class AdminEventsController {
|
|||||||
const job = await q.getJob(jobId);
|
const job = await q.getJob(jobId);
|
||||||
if (!job) return { error: 'Job not found' };
|
if (!job) return { error: 'Job not found' };
|
||||||
await job.retry();
|
await job.retry();
|
||||||
|
// Audit retry operation
|
||||||
|
await this.prisma.adminAuditLog.create({ data: { adminUserId: 'system', action: 'TASK_RETRY', resourceType: 'TaskLog', resourceId: jobId } }).catch(() => {});
|
||||||
// Audit
|
// Audit
|
||||||
await this.prisma.taskLog.updateMany({ where: { jobId }, data: { status: 'retried', updatedAt: new Date() } }).catch(() => {});
|
await this.prisma.taskLog.updateMany({ where: { jobId }, data: { status: 'retried', updatedAt: new Date() } }).catch(() => {});
|
||||||
return { success: true };
|
return { success: true };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user