Index: trunk/ippTools/share/magictool_toprocess_inputs.sql
===================================================================
--- trunk/ippTools/share/magictool_toprocess_inputs.sql	(revision 27276)
+++ trunk/ippTools/share/magictool_toprocess_inputs.sql	(revision 28768)
@@ -7,5 +7,6 @@
     -- note that the type stays a 64 bit int
     magicNodeResult.magic_id IS TRUE AS done,
-    magicNodeResult.fault IS TRUE AS bad
+    magicNodeResult.fault IS TRUE AS bad,
+    IFNULL(Label.priority, 10000) AS priority
 FROM magicRun
 JOIN magicTree USING(magic_id)
@@ -18,4 +19,5 @@
     ON diffRun.diff_id =  diffSkyfile.diff_id
 LEFT JOIN magicNodeResult USING(magic_id, node)
+LEFT JOIN Label ON magicRun.label = Label.label
 WHERE
     magicRun.state = 'new'
@@ -23,3 +25,4 @@
     AND magicNodeResult.node IS NULL
     AND diffRun.state = 'full'
+    AND (Label.active OR Label.active IS NULL)
 -- WHERE hook %s
