ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671)
This also gets rid of `Db.collection`, which was another source of circular dependencies.
This commit is contained in:
committed by
GitHub
parent
37dd658dc5
commit
000e76e3b4
@@ -2,7 +2,7 @@ import { EventEmitter } from 'events';
|
||||
import { assert, jsonStringify } from 'n8n-workflow';
|
||||
import type { IPushDataType } from '@/Interfaces';
|
||||
import { Logger } from '@/Logger';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { User } from '@db/entities/User';
|
||||
|
||||
/**
|
||||
* Abstract class for two-way push communication.
|
||||
|
||||
@@ -13,7 +13,7 @@ import { SSEPush } from './sse.push';
|
||||
import { WebSocketPush } from './websocket.push';
|
||||
import type { PushResponse, SSEPushRequest, WebSocketPushRequest } from './types';
|
||||
import type { IPushDataType } from '@/Interfaces';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { User } from '@db/entities/User';
|
||||
|
||||
const useWebSockets = config.getEnv('push.backend') === 'websocket';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Service } from 'typedi';
|
||||
import { Logger } from '@/Logger';
|
||||
import { AbstractPush } from './abstract.push';
|
||||
import type { PushRequest, PushResponse } from './types';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { User } from '@db/entities/User';
|
||||
|
||||
type Connection = { req: PushRequest; res: PushResponse };
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { User } from '@db/entities/User';
|
||||
import type { Request, Response } from 'express';
|
||||
import type { WebSocket } from 'ws';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type WebSocket from 'ws';
|
||||
import { Service } from 'typedi';
|
||||
import { Logger } from '@/Logger';
|
||||
import { AbstractPush } from './abstract.push';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { User } from '@db/entities/User';
|
||||
|
||||
function heartbeat(this: WebSocket) {
|
||||
this.isAlive = true;
|
||||
|
||||
Reference in New Issue
Block a user