Skip to content

Commit

Permalink
refactor(core): Merge event bus controllers and remove dead code (no-…
Browse files Browse the repository at this point in the history
…changelog) (#9688)
  • Loading branch information
ivov committed Jun 10, 2024
1 parent 2521daa commit 817167c
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 261 deletions.
3 changes: 0 additions & 3 deletions packages/@n8n/permissions/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export type Resource =
| 'credential'
| 'externalSecretsProvider'
| 'externalSecret'
| 'eventBusEvent'
| 'eventBusDestination'
| 'ldap'
| 'license'
Expand Down Expand Up @@ -45,7 +44,6 @@ export type EventBusDestinationScope = ResourceScope<
'eventBusDestination',
DefaultOperations | 'test'
>;
export type EventBusEventScope = ResourceScope<'eventBusEvent', DefaultOperations | 'query'>;
export type LdapScope = ResourceScope<'ldap', 'manage' | 'sync'>;
export type LicenseScope = ResourceScope<'license', 'manage'>;
export type LogStreamingScope = ResourceScope<'logStreaming', 'manage'>;
Expand All @@ -70,7 +68,6 @@ export type Scope =
| CredentialScope
| ExternalSecretProviderScope
| ExternalSecretScope
| EventBusEventScope
| EventBusDestinationScope
| LdapScope
| LicenseScope
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import { CredentialsOverwrites } from '@/CredentialsOverwrites';
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import * as ResponseHelper from '@/ResponseHelper';
import { EventBusController } from '@/eventbus/eventBus.controller';
import { EventBusControllerEE } from '@/eventbus/eventBus.controller.ee';
import { LicenseController } from '@/license/license.controller';
import { setupPushServer, setupPushHandler } from '@/push';
import { isLdapEnabled } from './Ldap/helpers';
Expand Down Expand Up @@ -119,7 +118,6 @@ export class Server extends AbstractServer {

const controllers: Array<Class<object>> = [
EventBusController,
EventBusControllerEE,
AuthController,
LicenseController,
OAuth1CredentialController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ export class MessageEventBusLogWriter {
}
}

/**
* Pauses all logging. Events are still received by the worker, they just are not logged any more
*/
async pauseLogging() {
if (this.worker) {
this.worker.postMessage({ command: 'pauseLogging', data: {} });
}
}

startRecoveryProcess() {
if (this.worker) {
this.worker.postMessage({ command: 'startRecoveryProcess', data: {} });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ if (!isMainThread) {
appendMessageSync(data);
parentPort?.postMessage({ command, data: true });
break;
case 'pauseLogging':
loggingPaused = true;
clearInterval(fileStatTimer);
break;
case 'initialize':
const settings: MessageEventBusLogWriterOptions = {
logFullBasePath: (data as MessageEventBusLogWriterOptions).logFullBasePath ?? '',
Expand Down
138 changes: 0 additions & 138 deletions packages/cli/src/eventbus/eventBus.controller.ee.ts

This file was deleted.

Loading

0 comments on commit 817167c

Please sign in to comment.