mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
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:
committed by
GitHub
parent
b147709189
commit
c4f41bb534
@@ -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);
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user