mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move webhook DB access to repository (no-changelog) (#6706)
* refactor(core): Move webhook DB access to repository (no-changelog) * make sure `DataSource` is initialized before it's dependencies at some point I hope to replace `DataSource` with a custom `DatabaseConnection` service class that can then disconnect and reconnect from DB without having to update all repositories. --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -104,6 +104,9 @@ class WorkflowRunnerProcess {
|
||||
|
||||
this.startedAt = new Date();
|
||||
|
||||
// Init db since we need to read the license.
|
||||
await Db.init();
|
||||
|
||||
const userSettings = await UserSettings.prepareUserSettings();
|
||||
|
||||
const loadNodesAndCredentials = Container.get(LoadNodesAndCredentials);
|
||||
@@ -117,9 +120,6 @@ class WorkflowRunnerProcess {
|
||||
const externalHooks = Container.get(ExternalHooks);
|
||||
await externalHooks.init();
|
||||
|
||||
// Init db since we need to read the license.
|
||||
await Db.init();
|
||||
|
||||
const instanceId = userSettings.instanceId ?? '';
|
||||
await Container.get(PostHogClient).init(instanceId);
|
||||
await Container.get(InternalHooks).init(instanceId);
|
||||
|
||||
Reference in New Issue
Block a user