feat: add dynamic per-image list queue with Start and End nodes

This commit is contained in:
Robert Wojciechowski
2026-10-11 08:49:23 +00:00
parent 87c0cda9f6
commit 3e280a0e29
19 changed files with 2367 additions and 17 deletions
+12 -2
View File
@@ -9,7 +9,9 @@ export function setupInterceptor(extension) {
const hasCollector = findNodesByClass(prompt.output, NODE_CLASSES.DISTRIBUTED_COLLECTOR).length > 0;
const hasDistUpscale = findNodesByClass(prompt.output, NODE_CLASSES.UPSCALE_DISTRIBUTED).length > 0;
if (hasCollector || hasDistUpscale) {
const hasImageList = findNodesByClass(prompt.output, NODE_CLASSES.IMAGE_LIST_START).length > 0;
if (hasCollector || hasDistUpscale || hasImageList) {
const result = await executeParallelDistributed(extension, prompt);
// Immediate status check for instant feedback
checkAllWorkerStatuses(extension);
@@ -25,12 +27,20 @@ export function setupInterceptor(extension) {
export async function executeParallelDistributed(extension, promptWrapper) {
const traceExecutionId = `exec_${Date.now()}_${generateUUID().slice(0, 6)}`;
try {
const enabledWorkers = extension.enabledWorkers;
const hasImageList = findNodesByClass(promptWrapper.output, NODE_CLASSES.IMAGE_LIST_START).length > 0;
// Image-list v1 uses direct workers only; do not contact paid provider pools.
const enabledWorkers = hasImageList
? extension.enabledWorkers.filter(worker => worker.type !== "serverless")
: extension.enabledWorkers;
extension.log(`[exec:${traceExecutionId}] Starting distributed execution`, "debug");
// Pre-flight health check on all enabled workers
const activeWorkers = await performPreflightCheck(extension, enabledWorkers);
if (hasImageList && activeWorkers.length === 0) {
throw new Error("Distributed Image List requires an active direct worker; master fallback is disabled.");
}
// Case: Enabled workers but all offline
if (activeWorkers.length === 0 && enabledWorkers.length > 0) {
extension.log("No active workers found. All enabled workers are offline.");