total can come from query
[Pman.Core] / Notify.php
index b1848ee..851528a 100644 (file)
@@ -183,6 +183,21 @@ class Pman_Core_Notify extends Pman
         $w = DB_DataObject::factory($this->table);
         $total = 0;
         
+        
+        
+        $ff = HTML_FlexyFramework::get();
+        if (!empty($ff->Core_Notify['servers'])) {
+            if (!isset($ff->Core_Notify['servers'][gethostname()])) {
+                $this->jerr("Core_Notify['servers']['" . gethostname() ."'] is not set");
+            }
+            $w->server_id = array_search(gethostname(),array_keys($ff->Core_Notify['servers']));
+        }
+        if (!empty($this->evtype)) {
+            $w->evtype = $this->evtype;
+        }
+        
+        
+        
         if (!empty($opts['old'])) {
             // show old and new...
             
@@ -207,23 +222,13 @@ class Pman_Core_Notify extends Pman
             $w->limit($opts['limit']); // we can run 1000 ...
         }
         
-        if (!empty($this->evtype)) {
-            $w->evtype = $this->evtype;
-        }
         
-        $ff = HTML_FlexyFramework::get();
-        if (!empty($ff->Core_Notify['servers'])) {
-            if (!isset($ff->Core_Notify['servers'][gethostname()])) {
-                $this->jerr("Core_Notify['servers']['" . gethostname() ."'] is not set");
-            }
-            $w->server_id = array_search(gethostname(),array_keys($ff->Core_Notify['servers']));
-        }
         
     
         
          
         $w->autoJoin();
-        $w->find();
+        $total = $w->find();
         
         
         
@@ -250,7 +255,7 @@ class Pman_Core_Notify extends Pman
                 $total--;
             }
             
-            $this->logecho("BATCH SIZE: ".  (count($this->queue) + $total) );
+            $this->logecho("BATCH SIZE: Queue=".  count($this->queue) . " TOTAL = " . $total  );
             
             if (empty($this->queue)) {
                 $this->logecho("COMPLETED MAIN QUEUE - running maxed out domains");