}
var $queue = array();
- var $domain_queue = array();
+ var $domain_queue = array(); // false to use nextquee
var $next_queue = array();
function get($r,$opts=array())
if ($this->poolHasDomain($email) > $this->max_to_domain) {
// push it to a 'domain specific queue'
-
-
- if ($pushed === false) {
- // we only try once to requeue..
- $this->logecho("REQUEING - maxed out that domain - {$email}");
- $requeue[] = $p;
- continue;
- }
- $this->logecho("PUSHING - maxed out that domain - {$email}");
-
+ $this->logecho("REQUEING - maxed out that domain - {$email}");
$this->pushQueueDomain($p, $email);
+
//sleep(3);
continue;
sleep(3);
}
- foreach($requeue as $p) {
+ foreach($this->next_queue as $p) {
$pp = clone($p);
$p->act_when = $p->sqlValue('NOW + INTERVAL 1 MINUTE');
$this->updateServer($p);
function pushQueueDomain($e, $email)
{
+ if ($this->domain_queue === false) {
+ $this->next_queue[] = $e;
+ return;
+ }
+
$ea = explode('@',$email);
$dom = strtolower(array_pop($ea));
if (!isset($this->domain_queue[$dom])) {