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] : [] });