refactor(core): Port event bus config (no-changelog) (#10111)
This commit is contained in:
31
packages/@n8n/config/src/configs/event-bus.ts
Normal file
31
packages/@n8n/config/src/configs/event-bus.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Config, Env, Nested } from '../decorators';
|
||||
|
||||
@Config
|
||||
class LogWriterConfig {
|
||||
/** Number of event log files to keep */
|
||||
@Env('N8N_EVENTBUS_LOGWRITER_KEEPLOGCOUNT')
|
||||
readonly keepLogCount: number = 3;
|
||||
|
||||
/** Max size (in KB) of an event log file before a new one is started */
|
||||
@Env('N8N_EVENTBUS_LOGWRITER_MAXFILESIZEINKB')
|
||||
readonly maxFileSizeInKB: number = 10240; // 10 MB
|
||||
|
||||
/** Basename of event log file */
|
||||
@Env('N8N_EVENTBUS_LOGWRITER_LOGBASENAME')
|
||||
readonly logBaseName: string = 'n8nEventLog';
|
||||
}
|
||||
|
||||
@Config
|
||||
export class EventBusConfig {
|
||||
/** How often (in ms) to check for unsent event messages. Can in rare cases cause a message to be sent twice. `0` to disable */
|
||||
@Env('N8N_EVENTBUS_CHECKUNSENTINTERVAL')
|
||||
readonly checkUnsentInterval: number = 0;
|
||||
|
||||
/** Endpoint to retrieve n8n version information from */
|
||||
@Nested
|
||||
readonly logWriter: LogWriterConfig;
|
||||
|
||||
/** Whether to recover execution details after a crash or only mark status executions as crashed. */
|
||||
@Env('N8N_EVENTBUS_RECOVERY_MODE')
|
||||
readonly crashRecoveryMode: 'simple' | 'extensive' = 'extensive';
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { VersionNotificationsConfig } from './configs/version-notifications';
|
||||
import { PublicApiConfig } from './configs/public-api';
|
||||
import { ExternalSecretsConfig } from './configs/external-secrets';
|
||||
import { TemplatesConfig } from './configs/templates';
|
||||
import { EventBusConfig } from './configs/event-bus';
|
||||
|
||||
@Config
|
||||
class UserManagementConfig {
|
||||
@@ -35,4 +36,7 @@ export class GlobalConfig {
|
||||
|
||||
@Nested
|
||||
templates: TemplatesConfig;
|
||||
|
||||
@Nested
|
||||
eventBus: EventBusConfig;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user