//date_default_timezone_set('UTC');
// phpinfo();exit;
-
-
-
- $w = DB_DataObject::factory('core_notify_recur');
- if (is_a($w, 'DB_DataObject')) {
- $w->generateNotifications();
- }
if (!empty($opts['generate'])) {
$w = DB_DataObject::factory($opts['generate']);
if (is_a($w, 'DB_DataObject')) {
$w->generateNotifications();
}
exit;
-
-
}
+
+
+ $w = DB_DataObject::factory('core_notify_recur');
+ if (is_a($w, 'DB_DataObject')) {
+ $w->generateNotifications();
+ }
+
//DB_DataObject::debugLevel(1);
$w = DB_DataObject::factory($this->table);
+ $total = 0;
if (!empty($opts['old'])) {
// show old and new...
$w->orderBy('act_when DESC'); // latest first
$w->limit($opts['limit']); // we can run
-
+ $total = min($w->count(), $opts['limit']);
} else {
// standard
}
$w->orderBy('act_when ASC'); // oldest first.
-
- $this->logecho("QUEUE is {$w->count()} only runing " . ((int) $opts['limit']));
+ $total = min($w->count(), $opts['limit']);
+ $this->logecho("QUEUE is {$w->count()} only running " . ((int) $opts['limit']));
$w->limit($opts['limit']); // we can run 1000 ...
}
while (true) {
if ($w->fetch()) {
$ar[] = clone($w);
+ $total--;
}
- $this->logecho("BATCH SIZE: ". count($ar) );
+ $this->logecho("BATCH SIZE: ". (count($ar) + $total) );
if (empty($ar)) {
- $this->logecho("COMPLETED MAIN QUEUE - running delated");
+ $this->logecho("COMPLETED MAIN QUEUE - running deleted");
if (empty($pushed)) {
break;