if ($pushed === false) {
// we only try once to requeue..
+ $this->logecho("REQUEING email for next run, as we have maxed out that domain");
$requeue[] = $p;
continue;
}
+ $this->logecho("PUSHING email, as we have maxed out that domain");
$pushed[] = $p;
foreach($requeue as $p) {
$pp = clone($p);
$p->act_when = $p->sqlValue('NOW + INTERVAL 1 MINUTE');
+ $this->updateServer($p);
$p->update($pp);
}
exit;
}
-
+ // this sequentially distributes requeued emails.. - to other servers.
+ function updateServer($w)
+ {
+ $ff = HTML_FlexyFramework::get();
+ static $num = 0;
+ if (empty($ff->Core_Notify['servers'])) {
+ return;
+ }
+ $num++;
+ // next server..
+ $w->server_id = $num % count(array_keys($ff->Core_Notify['servers']));
+
+ }
function generateNotifications()