update_rss_feed: limit maximum execution time while processing articles
This commit is contained in:
parent
fe4535e6d3
commit
6c9f3d4a60
1 changed files with 7 additions and 0 deletions
|
@ -588,11 +588,18 @@
|
|||
|
||||
_debug("processing articles...", $debug_enabled);
|
||||
|
||||
$tstart = time();
|
||||
|
||||
foreach ($items as $item) {
|
||||
if ($_REQUEST['xdebug'] == 3) {
|
||||
print_r($item);
|
||||
}
|
||||
|
||||
if (ini_get("max_execution_time") > 0 && time() - $tstart >= ini_get("max_execution_time") * 0.7) {
|
||||
_debug("looks like there's too many articles to process at once, breaking out", $debug_enabled);
|
||||
break;
|
||||
}
|
||||
|
||||
$entry_guid = $item->get_id();
|
||||
if (!$entry_guid) $entry_guid = $item->get_link();
|
||||
if (!$entry_guid) $entry_guid = make_guid_from_title($item->get_title());
|
||||
|
|
Loading…
Reference in a new issue