feat(FN-3450): add mesh task create replication across nodes
Implements distributed mesh task creation by adding replicated create primitives to the core store, wiring new API routes (`register-mesh-routes.ts`) that replicate task creation across clustered nodes while preserving remote-targeting metadata, and updating the dashboard's task creation flow accord Fusion-Task-Id: FN-3450
This commit is contained in:
@@ -247,7 +247,16 @@ export async function fetchTaskDetail(id: string, projectId?: string): Promise<T
|
||||
throw new Error("Request failed");
|
||||
}
|
||||
|
||||
export function createTask(input: TaskCreateInput, projectId?: string): Promise<Task> {
|
||||
export interface CreateTaskRequestOptions {
|
||||
transportNodeId?: string;
|
||||
localNodeId?: string;
|
||||
}
|
||||
|
||||
export function createTask(
|
||||
input: TaskCreateInput,
|
||||
projectId?: string,
|
||||
options?: CreateTaskRequestOptions,
|
||||
): Promise<Task> {
|
||||
const {
|
||||
title,
|
||||
description,
|
||||
@@ -269,12 +278,15 @@ export function createTask(input: TaskCreateInput, projectId?: string): Promise<
|
||||
executionMode,
|
||||
priority,
|
||||
source,
|
||||
nodeId,
|
||||
branch,
|
||||
baseBranch,
|
||||
} = input;
|
||||
|
||||
return api<Task>(withProjectId("/tasks", projectId), {
|
||||
return proxyApi<Task>(withProjectId("/tasks", projectId), {
|
||||
method: "POST",
|
||||
nodeId: options?.transportNodeId,
|
||||
localNodeId: options?.localNodeId,
|
||||
body: JSON.stringify({
|
||||
title,
|
||||
description,
|
||||
@@ -296,6 +308,7 @@ export function createTask(input: TaskCreateInput, projectId?: string): Promise<
|
||||
executionMode,
|
||||
priority,
|
||||
source,
|
||||
nodeId,
|
||||
branch,
|
||||
baseBranch,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user