fix: extend local edit task wait time

This commit is contained in:
134 2026-06-17 13:27:00 +08:00
parent 1f1f3fd276
commit 9fae6c6a62
3 changed files with 4 additions and 3 deletions

View File

@ -725,7 +725,7 @@ type DirectDetailReviewResult = {
};
const AGENT_IMAGE_TASK_POLL_INTERVAL_MS = 1600;
const AGENT_IMAGE_TASK_TIMEOUT_MS = 4 * 60 * 1000;
const AGENT_IMAGE_TASK_TIMEOUT_MS = 8 * 60 * 1000;
const AGENT_DETAIL_IMAGE_PARALLEL_WORKER_COUNT = 4;
function sleep(ms: number) {

View File

@ -610,6 +610,7 @@ const OFFICIAL_DROPDOWN_SCALE = 0.7;
const OFFICIAL_NINE_GRID_WIDTH = 930;
const OFFICIAL_NINE_GRID_HEIGHT = 520;
const LOCAL_EDIT_MAX_REGIONS = 8;
const LOCAL_EDIT_MAX_POLL_ATTEMPTS = 192;
const LOCAL_EDIT_COLORS = [
"#ff3b30",
"#1677ff",
@ -4177,7 +4178,7 @@ export function LiblibVideoCanvasReplica({ canvasId, isLoading = false }: Liblib
}, []);
const pollLocalEditTaskForNode = useCallback(async (nodeId: string, taskId: string) => {
for (let attempt = 0; attempt < 180; attempt += 1) {
for (let attempt = 0; attempt < LOCAL_EDIT_MAX_POLL_ATTEMPTS; attempt += 1) {
await wait(attempt < 6 ? 1500 : 2500);
const response = await imageGenerationService.getImageTask(taskId);
if (!response.success || !response.data?.task) {

View File

@ -37,7 +37,7 @@ export const LOCAL_EDIT_MAX_REGIONS = 8;
export const LOCAL_EDIT_MAX_REFERENCE_IMAGES_PER_REGION = 3;
export const LOCAL_EDIT_MIN_EDGE_PX = 24;
export const LOCAL_EDIT_POLL_INTERVAL_MS = 2500;
export const LOCAL_EDIT_MAX_POLL_ATTEMPTS = 180;
export const LOCAL_EDIT_MAX_POLL_ATTEMPTS = 192;
export const LOCAL_EDIT_COLORS = [
"#ef4444",
"#2563eb",