Fix assert unreachable, remove unused variables (#13753)

Small code cleanup
This commit is contained in:
Félix Malfait
2025-08-08 09:04:45 +02:00
committed by GitHub
parent 8b4b9ef8da
commit 0236f79ccf
105 changed files with 172 additions and 315 deletions
@@ -1,4 +1,3 @@
import { Logger } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import snakeCase from 'lodash.snakecase';
@@ -20,10 +19,6 @@ export const MESSAGING_MESSAGE_CHANNEL_SYNC_STATUS_MONITORING_CRON_PATTERN =
@Processor(MessageQueue.cronQueue)
export class MessagingMessageChannelSyncStatusMonitoringCronJob {
private readonly logger = new Logger(
MessagingMessageChannelSyncStatusMonitoringCronJob.name,
);
constructor(
@InjectRepository(Workspace, 'core')
private readonly workspaceRepository: Repository<Workspace>,
@@ -13,23 +13,16 @@ type MessagingMonitoringTrackInput = {
@Injectable()
export class MessagingMonitoringService {
constructor(private readonly auditService: AuditService) {}
constructor(private readonly _auditService: AuditService) {}
public async track({
eventName,
workspaceId,
userId,
connectedAccountId,
messageChannelId,
message,
eventName: _eventName,
workspaceId: _workspaceId,
userId: _userId,
connectedAccountId: _connectedAccountId,
messageChannelId: _messageChannelId,
message: _message,
}: MessagingMonitoringTrackInput): Promise<void> {
const _eventName = eventName;
const _workspaceId = workspaceId;
const _userId = userId;
const _connectedAccountId = connectedAccountId;
const _messageChannelId = messageChannelId;
const _message = message;
// TODO: replace once we have Prometheus
/*
await this.auditService