feat: enhance media handling and audio processing logic
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import type { Router } from "express";
|
||||
import express from "express";
|
||||
import { AppError } from "../errors";
|
||||
import { createChildLogger } from "../logger";
|
||||
import {
|
||||
getAnalysisQueueStatus,
|
||||
queueMessageAnalysis,
|
||||
} from "../moderation/aiAnalyzer";
|
||||
import { getMessageById } from "../moderation/messageStore";
|
||||
|
||||
const logger = createChildLogger("analysis-routes");
|
||||
|
||||
export function createAnalysisRoutes(): Router {
|
||||
const router = express.Router();
|
||||
|
||||
@@ -41,8 +38,6 @@ export function createAnalysisRoutes(): Router {
|
||||
// Queue for analysis
|
||||
await queueMessageAnalysis(id);
|
||||
|
||||
logger.info({ messageId: id }, "Message queued for re-analysis");
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
messageId: id,
|
||||
|
||||
@@ -45,7 +45,6 @@ export function createSyncRoutes(client: Client): Router {
|
||||
}
|
||||
|
||||
if (shouldSkipRecentBacklogSync(guildId, channelId)) {
|
||||
logger.debug({ guildId, channelId }, "Skipping recent backlog sync");
|
||||
res.json({
|
||||
success: true,
|
||||
channelId,
|
||||
@@ -56,15 +55,8 @@ export function createSyncRoutes(client: Client): Router {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info({ guildId, channelId }, "Queueing backlog sync");
|
||||
|
||||
syncSelectedChannelBacklog(client, guildId, channelId)
|
||||
.then((count) => {
|
||||
logger.info(
|
||||
{ guildId, channelId, messagesSync: count },
|
||||
"Backlog sync complete",
|
||||
);
|
||||
})
|
||||
.then(() => {})
|
||||
.catch((error) => {
|
||||
logger.warn(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user