feat(core): Add retry execution endpoint to public api (#19132)

Co-authored-by: Csaba Tuncsik <csaba.tuncsik@gmail.com>
Co-authored-by: Marc Littlemore <MarcL@users.noreply.github.com>
This commit is contained in:
Konstantin Tieber
2025-09-11 10:12:53 +02:00
committed by GitHub
parent b147709189
commit c4f41bb534
16 changed files with 229 additions and 20 deletions

View File

@@ -245,8 +245,8 @@ async function retryOriginalExecution(execution: ExecutionSummary) {
async function retryExecution(execution: ExecutionSummary, loadWorkflow?: boolean) {
try {
const retryStatus = await executionsStore.retryExecution(execution.id, loadWorkflow);
const retryMessage = executionRetryMessage(retryStatus);
const retriedExecution = await executionsStore.retryExecution(execution.id, loadWorkflow);
const retryMessage = executionRetryMessage(retriedExecution.status);
if (retryMessage) {
toast.showMessage(retryMessage);

View File

@@ -1,6 +1,6 @@
import { defineStore } from 'pinia';
import { computed, ref } from 'vue';
import type { IDataObject, ExecutionSummary, AnnotationVote, ExecutionStatus } from 'n8n-workflow';
import type { IDataObject, ExecutionSummary, AnnotationVote } from 'n8n-workflow';
import type {
ExecutionFilterType,
ExecutionsQueryFilter,
@@ -244,8 +244,8 @@ export const useExecutionsStore = defineStore('executions', () => {
);
}
async function retryExecution(id: string, loadWorkflow?: boolean): Promise<ExecutionStatus> {
return await makeRestApiRequest(
async function retryExecution(id: string, loadWorkflow?: boolean): Promise<IExecutionResponse> {
const retriedExecution = await makeRestApiRequest<IExecutionResponse>(
rootStore.restApiContext,
'POST',
`/executions/${id}/retry`,
@@ -255,6 +255,7 @@ export const useExecutionsStore = defineStore('executions', () => {
}
: undefined,
);
return retriedExecution;
}
async function deleteExecutions(sendData: IExecutionDeleteFilter): Promise<void> {

View File

@@ -283,9 +283,9 @@ async function onExecutionRetry(payload: { id: string; loadWorkflow: boolean })
async function retryExecution(payload: { id: string; loadWorkflow: boolean }) {
try {
const retryStatus = await executionsStore.retryExecution(payload.id, payload.loadWorkflow);
const retriedExecution = await executionsStore.retryExecution(payload.id, payload.loadWorkflow);
const retryMessage = executionRetryMessage(retryStatus);
const retryMessage = executionRetryMessage(retriedExecution.status);
if (retryMessage) {
toast.showMessage(retryMessage);