$num_servers = count(array_keys($ff->Core_Notify['servers']));
$p = DB_DataObject::factory($this->table);
+ $p->whereAdd("
+ sent < '2000-01-01'
+ and
+ event_id = 0
+ and
+ act_start < NOW() + INTERVAL 3 HOUR
+ and
+ server_id < 0"
+
+ );
+ if ($p->count() < 1) {
+ return;
+ }
+
// 6 seconds on this machne...
$p->query("
UPDATE
and
event_id = 0
and
- act_start < NOW()
+ act_start < NOW() + INTERVAL 3 HOUR
and
server_id < 0
ORDER BY
id ASC
LIMIT
- 20000
+ 10000
");