projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
413ca3a
)
tidy up end exit on empty queue
author
Alan
<alan@roojs.com>
Mon, 21 Aug 2023 02:08:59 +0000
(10:08 +0800)
committer
Alan
<alan@roojs.com>
Mon, 21 Aug 2023 02:08:59 +0000
(10:08 +0800)
Notify.php
patch
|
blob
|
history
diff --git
a/Notify.php
b/Notify.php
index
f4335e8
..
58bd363
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-231,6
+231,10
@@
class Pman_Core_Notify extends Pman
$w->autoJoin();
$total = $w->find();
$w->autoJoin();
$total = $w->find();
+ if (empty($total)) {
+ $this->logecho("Nothing In Queue - DONE");
+ exit;
+ }
if (!empty($opts['list'])) {
if (!empty($opts['list'])) {
@@
-281,7
+285,7
@@
class Pman_Core_Notify extends Pman
$black = $this->isBlacklisted($email);
if ($black !== false) {
$this->logecho("DOMAIN blacklisted - {$email} - moving to another pool");
$black = $this->isBlacklisted($email);
if ($black !== false) {
$this->logecho("DOMAIN blacklisted - {$email} - moving to another pool");
- $this->updateServer(
clone($p)
, $black);
+ $this->updateServer(
$p
, $black);
continue;
}
continue;
}
@@
-355,10
+359,10
@@
class Pman_Core_Notify extends Pman
// this sequentially distributes requeued emails.. - to other servers. (can exclude current one if we have that flagged.)
function updateServer($ww, $exclude = -1)
{
// this sequentially distributes requeued emails.. - to other servers. (can exclude current one if we have that flagged.)
function updateServer($ww, $exclude = -1)
{
-$w = DB_DataObject::factory($ww->tableName());
-$w->get($ww->id);
-
-$ff = HTML_FlexyFramework::get();
+
$w = DB_DataObject::factory($ww->tableName());
+
$w->get($ww->id);
+
+
$ff = HTML_FlexyFramework::get();
static $num = 0;
if (empty($ff->Core_Notify['servers'])) {
return;
static $num = 0;
if (empty($ff->Core_Notify['servers'])) {
return;