diff --git a/services/discord-gateway/src/modules/ai-moderation/batchScheduler.ts b/services/discord-gateway/src/modules/ai-moderation/batchScheduler.ts index 8cb7f90d..8d545f8b 100644 --- a/services/discord-gateway/src/modules/ai-moderation/batchScheduler.ts +++ b/services/discord-gateway/src/modules/ai-moderation/batchScheduler.ts @@ -97,10 +97,18 @@ function scheduleLaneTimer( conversationDebounceTimers.delete(tKey); if (isConversationProcessingLocked(conversationKey, lane)) { + logger.warn( + { conversationKey, lane, tKey }, + "scheduleLaneTimer: lane locked, skipping dispatch", + ); return; } const processingStartedAt = Date.now(); setConversationProcessing(conversationKey, lane, processingStartedAt); + logger.debug( + { conversationKey, lane, processingStartedAt }, + "scheduleLaneTimer: lock acquired, dispatching batch fetch", + ); messageStore .getPendingMessagesByConversation(