mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Refactor usePushConnection and introduce new queueing system (#14529)
This commit is contained in:
@@ -22,7 +22,6 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { nodeViewEventBus } from '@/event-bus';
|
||||
import { usePinnedData } from '@/composables/usePinnedData';
|
||||
import { useRunWorkflow } from '@/composables/useRunWorkflow';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
@@ -72,7 +71,6 @@ const externalHooks = useExternalHooks();
|
||||
const toast = useToast();
|
||||
const ndvStore = useNDVStore();
|
||||
const nodeTypesStore = useNodeTypesStore();
|
||||
const uiStore = useUIStore();
|
||||
const i18n = useI18n();
|
||||
const message = useMessage();
|
||||
const telemetry = useTelemetry();
|
||||
@@ -85,7 +83,7 @@ const nodeType = computed((): INodeTypeDescription | null => {
|
||||
});
|
||||
|
||||
const isNodeRunning = computed(() => {
|
||||
if (!uiStore.isActionActive.workflowRunning || codeGenerationInProgress.value) return false;
|
||||
if (!workflowsStore.isWorkflowRunning || codeGenerationInProgress.value) return false;
|
||||
const triggeredNode = workflowsStore.executedNode;
|
||||
return (
|
||||
workflowsStore.isNodeExecuting(node.value?.name ?? '') || triggeredNode === node.value?.name
|
||||
@@ -96,8 +94,6 @@ const isTriggerNode = computed(() => {
|
||||
return node.value ? nodeTypesStore.isTriggerNode(node.value.type) : false;
|
||||
});
|
||||
|
||||
const isWorkflowRunning = computed(() => uiStore.isActionActive.workflowRunning);
|
||||
|
||||
const isManualTriggerNode = computed(() =>
|
||||
nodeType.value ? nodeType.value.name === MANUAL_TRIGGER_NODE_TYPE : false,
|
||||
);
|
||||
@@ -168,7 +164,7 @@ const disabledHint = computed(() => {
|
||||
return i18n.baseText('ndv.execute.requiredFieldsMissing');
|
||||
}
|
||||
|
||||
if (isWorkflowRunning.value && !isNodeRunning.value) {
|
||||
if (workflowsStore.isWorkflowRunning && !isNodeRunning.value) {
|
||||
return i18n.baseText('ndv.execute.workflowAlreadyRunning');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user