Index: trunk/ippTasks/pstamp.pro
===================================================================
--- trunk/ippTasks/pstamp.pro	(revision 30555)
+++ trunk/ippTasks/pstamp.pro	(revision 30567)
@@ -18,4 +18,21 @@
 $pstampStopFaulted_DB = 0
 
+# give up on dependents with fault_count >= $PSTAMP_MAX_FAULT_COUNT
+$PSTAMP_MAX_FAULT_COUNT = 5
+macro set.max.fault.count
+    $PSTAMP_MAX_FAULT_COUNT = $1
+end
+macro get.max.fault.count
+    echo maximum fault count: $PSTAMP_MAX_FAULT_COUNT
+end
+$POLL_DEP = 500
+
+macro set.dependent.poll
+    $POLL_DEP = $1
+end
+macro get.dependent.poll
+    echo dependent poll limit: $POLL_DEP
+end
+
 # set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config
 # warning: no quotes around the two words. That causes the variable to get passed to pstamptool as one word
@@ -137,4 +154,5 @@
     end
 end
+
 macro pstamp.find.on
     task pstamp.request.find
@@ -143,8 +161,26 @@
 end
 macro pstamp.find.off
-    task pstamp.request.find.load
-        active false
-    end
-end
+    task pstamp.request.find
+        active false
+    end
+end
+
+macro pstamp.dependent.on
+    task pstamp.dependent.load
+        active true
+    end
+    task pstamp.dependent.run
+        active true
+    end
+end
+macro pstamp.dependent.off
+    task pstamp.dependent.load
+        active false
+    end
+    task pstamp.dependent.run
+        active false
+    end
+end
+
 
 macro pstamp.status.on
@@ -158,4 +194,5 @@
     end
 end
+
 macro pstamp.status.set.exec
     task pstamp.save.status
@@ -525,5 +562,5 @@
             echo pstamp.job.run task.exit $JOB_ID status: $JOB_STATUS
         end
-        showcommand failure
+#        showcommand failure
         process_exit pstampJob $options:0 $JOB_STATUS
     end
@@ -609,5 +646,5 @@
         add_poll_args run
         add_poll_labels run 
-        command $run
+        command $run -limit $POLL_DEP
     end
 
@@ -664,4 +701,5 @@
         book getword pstampDependent $pageName outdir     -var OUTDIR
         book getword pstampDependent $pageName need_magic -var NEED_MAGIC
+        book getword pstampDependent $pageName fault_count -var FAULT_COUNT
         book getword pstampDependent $pageName dbname     -var DBNAME
 
@@ -682,5 +720,5 @@
         stderr $MYLOGFILE
 
-        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC
+        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT
 
         add_standard_args run
@@ -705,5 +743,5 @@
             echo pstamp.job.run task.exit $DEP_ID status: $JOB_STATUS
         end
-        showcommand failure
+#        showcommand failure
         process_exit pstampDependent $options:0 $JOB_STATUS
     end
