mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Make Logger a service (no-changelog) (#7494)
This commit is contained in:
committed by
GitHub
parent
db4e61ba24
commit
05586a900d
@@ -7,7 +7,7 @@ import type {
|
||||
IRun,
|
||||
ExecutionStatus,
|
||||
} from 'n8n-workflow';
|
||||
import { createDeferredPromise, LoggerProxy } from 'n8n-workflow';
|
||||
import { createDeferredPromise } from 'n8n-workflow';
|
||||
|
||||
import type { ChildProcess } from 'child_process';
|
||||
import type PCancelable from 'p-cancelable';
|
||||
@@ -20,6 +20,7 @@ import type {
|
||||
} from '@/Interfaces';
|
||||
import { isWorkflowIdValid } from '@/utils';
|
||||
import { ExecutionRepository } from '@db/repositories';
|
||||
import { Logger } from '@/Logger';
|
||||
|
||||
@Service()
|
||||
export class ActiveExecutions {
|
||||
@@ -27,6 +28,8 @@ export class ActiveExecutions {
|
||||
[index: string]: IExecutingWorkflowData;
|
||||
} = {};
|
||||
|
||||
constructor(private readonly logger: Logger) {}
|
||||
|
||||
/**
|
||||
* Add a new active execution
|
||||
*/
|
||||
@@ -225,7 +228,7 @@ export class ActiveExecutions {
|
||||
|
||||
async setStatus(executionId: string, status: ExecutionStatus): Promise<void> {
|
||||
if (this.activeExecutions[executionId] === undefined) {
|
||||
LoggerProxy.debug(
|
||||
this.logger.debug(
|
||||
`There is no active execution with id "${executionId}", can't update status to ${status}.`,
|
||||
);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user