From 239654be134b96ecba52e83a6d8f012370c17880 Mon Sep 17 00:00:00 2001 From: dlawler489 <104159223@student.swin.edu.au> Date: Wed, 16 Sep 2026 12:50:56 +1000 Subject: [PATCH] Pausing a watch stops the batch it's in the middle of Pause only prevented the next check: the batch already running kept importing its remaining models, which is the opposite of what the button suggests. Co-Authored-By: Claude Opus 5 --- lib/collectionWatch.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/collectionWatch.js b/lib/collectionWatch.js index 6e8f9e0..dbd73f3 100644 --- a/lib/collectionWatch.js +++ b/lib/collectionWatch.js @@ -157,6 +157,9 @@ async function importFound(watch, collection) { let problem = null; const fresh = []; for (const design of todo) { + // Paused while this batch was running: stop, rather than import the rest. + const { rows: [live] } = await db.query('SELECT enabled FROM watched_collections WHERE id = $1', [watch.id]); + if (!live || !live.enabled) break; const url = makerworld.designUrl(design); try { const result = await deps.importFromUrl(url, { projects: watch.project_id ? [watch.project_id] : [] });