mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): Move multi-main state to InstanceSettings (#12144)
This commit is contained in:
@@ -511,7 +511,7 @@ export class ActiveWorkflowManager {
|
||||
existingWorkflow?: WorkflowEntity,
|
||||
{ shouldPublish } = { shouldPublish: true },
|
||||
) {
|
||||
if (this.orchestrationService.isMultiMainSetupEnabled && shouldPublish) {
|
||||
if (this.instanceSettings.isMultiMain && shouldPublish) {
|
||||
void this.publisher.publishCommand({
|
||||
command: 'add-webhooks-triggers-and-pollers',
|
||||
payload: { workflowId },
|
||||
@@ -703,7 +703,7 @@ export class ActiveWorkflowManager {
|
||||
// TODO: this should happen in a transaction
|
||||
// maybe, see: https://github.com/n8n-io/n8n/pull/8904#discussion_r1530150510
|
||||
async remove(workflowId: string) {
|
||||
if (this.orchestrationService.isMultiMainSetupEnabled) {
|
||||
if (this.instanceSettings.isMultiMain) {
|
||||
try {
|
||||
await this.clearWebhooks(workflowId);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user