mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
refactor(core): Unify error reporters in core and task runners (#12168)
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
@@ -34,7 +34,7 @@ import { WorkflowHistoryManager } from '@/workflows/workflow-history/workflow-hi
|
||||
export abstract class BaseCommand extends Command {
|
||||
protected logger = Container.get(Logger);
|
||||
|
||||
protected readonly errorReporter = Container.get(ErrorReporter);
|
||||
protected errorReporter: ErrorReporter;
|
||||
|
||||
protected externalHooks?: ExternalHooks;
|
||||
|
||||
@@ -60,7 +60,11 @@ export abstract class BaseCommand extends Command {
|
||||
protected needsCommunityPackages = false;
|
||||
|
||||
async init(): Promise<void> {
|
||||
await this.errorReporter.init();
|
||||
this.errorReporter = Container.get(ErrorReporter);
|
||||
await this.errorReporter.init(
|
||||
this.instanceSettings.instanceType,
|
||||
this.globalConfig.sentry.backendDsn,
|
||||
);
|
||||
initExpressionEvaluator();
|
||||
|
||||
process.once('SIGTERM', this.onTerminationSignal('SIGTERM'));
|
||||
|
||||
Reference in New Issue
Block a user