refactor(editor): Refactor usePushConnection and introduce new queueing system (#14529)

This commit is contained in:
Alex Grozav
2025-04-30 15:36:43 +03:00
committed by GitHub
parent 442cd094ee
commit 833d8e3c18
49 changed files with 1525 additions and 1262 deletions

View File

@@ -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');
}