mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
⚡ Do only send manual executions to starting session & cleanup
This commit is contained in:
@@ -314,8 +314,7 @@ export interface IExecutionsListResponse {
|
||||
}
|
||||
|
||||
export interface IExecutionsCurrentSummaryExtended {
|
||||
id?: string;
|
||||
idActive: string;
|
||||
id: string;
|
||||
finished?: boolean;
|
||||
mode: WorkflowExecuteMode;
|
||||
retryOf?: string;
|
||||
@@ -334,8 +333,7 @@ export interface IExecutionsStopData {
|
||||
}
|
||||
|
||||
export interface IExecutionsSummary {
|
||||
id?: string; // executionIdDb
|
||||
idActive?: string; // executionIdActive
|
||||
id: string;
|
||||
mode: WorkflowExecuteMode;
|
||||
finished?: boolean;
|
||||
retryOf?: string;
|
||||
@@ -370,8 +368,7 @@ export interface IPushDataExecutionStarted {
|
||||
|
||||
export interface IPushDataExecutionFinished {
|
||||
data: IRun;
|
||||
executionIdActive: string;
|
||||
executionIdDb?: string;
|
||||
executionId: string;
|
||||
retryOf?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
<template slot-scope="scope">
|
||||
{{convertToDisplayDate(scope.row.startedAt)}}<br />
|
||||
<small v-if="scope.row.id">ID: {{scope.row.id}}</small>
|
||||
<small v-if="scope.row.idActive && scope.row.id === undefined && scope.row.stoppedAt === undefined">Active-ID: {{scope.row.idActive}}</small>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="workflowName" label="Name">
|
||||
@@ -126,8 +125,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.stoppedAt === undefined && scope.row.idActive">
|
||||
<el-button circle title="Stop Execution" @click.stop="stopExecution(scope.row.idActive)" :loading="stoppingExecutions.includes(scope.row.idActive)" size="mini">
|
||||
<span v-if="scope.row.stoppedAt === undefined">
|
||||
<el-button circle title="Stop Execution" @click.stop="stopExecution(scope.row.id)" :loading="stoppingExecutions.includes(scope.row.id)" size="mini">
|
||||
<font-awesome-icon icon="stop" />
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
@@ -191,7 +191,7 @@ export const pushConnection = mixins(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.$store.getters.activeExecutionId !== pushData.executionIdActive) {
|
||||
if (this.$store.getters.activeExecutionId !== pushData.executionId) {
|
||||
// The workflow which did finish execution did either not get started
|
||||
// by this session or we do not have the execution id yet.
|
||||
if (isRetry !== true) {
|
||||
@@ -242,7 +242,7 @@ export const pushConnection = mixins(
|
||||
const pushData = receivedData.data as IPushDataExecutionStarted;
|
||||
|
||||
const executionData: IExecutionsCurrentSummaryExtended = {
|
||||
idActive: pushData.executionId,
|
||||
id: pushData.executionId,
|
||||
finished: false,
|
||||
mode: pushData.mode,
|
||||
startedAt: pushData.startedAt,
|
||||
|
||||
@@ -99,7 +99,7 @@ export const store = new Vuex.Store({
|
||||
addActiveExecution (state, newActiveExecution: IExecutionsCurrentSummaryExtended) {
|
||||
// Check if the execution exists already
|
||||
const activeExecution = state.activeExecutions.find(execution => {
|
||||
return execution.idActive === newActiveExecution.idActive;
|
||||
return execution.id === newActiveExecution.id;
|
||||
});
|
||||
|
||||
if (activeExecution !== undefined) {
|
||||
@@ -115,7 +115,7 @@ export const store = new Vuex.Store({
|
||||
finishActiveExecution (state, finishedActiveExecution: IPushDataExecutionFinished) {
|
||||
// Find the execution to set to finished
|
||||
const activeExecution = state.activeExecutions.find(execution => {
|
||||
return execution.idActive === finishedActiveExecution.executionIdActive;
|
||||
return execution.id === finishedActiveExecution.executionId;
|
||||
});
|
||||
|
||||
if (activeExecution === undefined) {
|
||||
@@ -123,8 +123,8 @@ export const store = new Vuex.Store({
|
||||
return;
|
||||
}
|
||||
|
||||
if (finishedActiveExecution.executionIdDb !== undefined) {
|
||||
Vue.set(activeExecution, 'id', finishedActiveExecution.executionIdDb);
|
||||
if (finishedActiveExecution.executionId !== undefined) {
|
||||
Vue.set(activeExecution, 'id', finishedActiveExecution.executionId);
|
||||
}
|
||||
|
||||
Vue.set(activeExecution, 'finished', finishedActiveExecution.data.finished);
|
||||
|
||||
@@ -742,8 +742,7 @@ export default mixins(
|
||||
} as IRun;
|
||||
const pushData = {
|
||||
data: executedData,
|
||||
executionIdActive: executionId,
|
||||
executionIdDb: executionId,
|
||||
executionId: executionId,
|
||||
retryOf: execution.retryOf,
|
||||
} as IPushDataExecutionFinished;
|
||||
this.$store.commit('finishActiveExecution', pushData);
|
||||
@@ -759,8 +758,6 @@ export default mixins(
|
||||
} else {
|
||||
this.$showError(error, 'Problem stopping execution', 'There was a problem stopping the execuction:');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
this.stopExecutionInProgress = false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user