speed up when no feeds to update
This commit is contained in:
parent
a28113eca6
commit
c29fa6fc91
@ -426,9 +426,7 @@ class zoneclearFeedServer
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set feeds user
|
$enabled = false;
|
||||||
$this->enableUser(true);
|
|
||||||
|
|
||||||
$updates = false;
|
$updates = false;
|
||||||
$loop_mem = [];
|
$loop_mem = [];
|
||||||
|
|
||||||
@ -443,9 +441,14 @@ class zoneclearFeedServer
|
|||||||
|
|
||||||
while ($f->fetch()) {
|
while ($f->fetch()) {
|
||||||
# Check if feed need update
|
# Check if feed need update
|
||||||
if ($id || $i < $limit && $f->feed_status == 1
|
if ($id
|
||||||
&& $time > $f->feed_upd_last + $f->feed_upd_int
|
|| $i < $limit && $f->feed_status == 1 && ($time > $f->feed_upd_last + $f->feed_upd_int)
|
||||||
) {
|
) {
|
||||||
|
if (!$enabled) {
|
||||||
|
# Set feeds user
|
||||||
|
$this->enableUser(true);
|
||||||
|
$enabled = true;
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
$feed = self::readFeed($f->feed_feed);
|
$feed = self::readFeed($f->feed_feed);
|
||||||
|
|
||||||
@ -693,7 +696,9 @@ class zoneclearFeedServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($enabled) {
|
||||||
$this->enableUser(false);
|
$this->enableUser(false);
|
||||||
|
}
|
||||||
$this->unlockUpdate();
|
$this->unlockUpdate();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user