(context: QueueTransitionContext)
| 65 | nextRetryAt?: Date | null; |
| 66 | logContext?: Omit<QueueTransitionContext, 'queueId' | 'fromState' | 'toState' | 'failureCode'> & { |
| 67 | fromState?: QueueStatus; |
| 68 | attemptCount?: number; |
| 69 | }; |
| 70 | }; |
| 71 | |
| 72 | function logQueueTransition(context: QueueTransitionContext): void { |
| 73 | logger.info('Auto-analysis queue transition', { |
| 74 | job_id: context.jobId, |
| 75 | owned_by_organization_id: context.owner?.type === 'org' ? context.owner.id : null, |
| 76 | owned_by_user_id: context.owner?.type === 'user' ? context.owner.id : null, |
| 77 | owner_type: context.owner?.type, |
| 78 | owner_id: context.owner?.id, |
| 79 | finding_id: context.findingId, |
| 80 | queue_id: context.queueId, |
| 81 | claim_token: context.claimToken, |
| 82 | from_state: context.fromState, |
| 83 | to_state: context.toState, |
| 84 | attempt_count: context.attemptCount, |
| 85 | failure_code: context.failureCode ?? null, |
| 86 | actor_user_id: context.actorUserId, |
| 87 | actor_resolution_mode: context.actorResolutionMode, |
no test coverage detected