Fix assert unreachable, remove unused variables (#13753)
Small code cleanup
This commit is contained in:
-5
@@ -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>,
|
||||
|
||||
+7
-14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user