Changeset 773

Show
Ignore:
Timestamp:
12/22/06 17:26:17 (2 years ago)
Author:
sven
Message:

feeds: it's been a while since we fiddled with cron timings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/units/magpie/function_init.php

    r767 r773  
    1111} 
    1212 
     13if (empty($CFG->mintimebetweenrssupdate)) { 
     14    $CFG->mintimebetweenrssupdate = 1800; 
     15} 
     16 
    1317define('rss','true'); 
    1418define('MAGPIE_DIR', $CFG->dirroot . "units/magpie/"); 
  • devel/units/magpie/function_update.php

    r702 r773  
    1212if (!empty($feed) && !empty($subscribers)) { 
    1313 
    14     $update_time = 1; 
    15  
    16     /* if ($subscribers > 10) { 
    17         $update_time = 3600; 
     14    if ($subscribers > 10) { 
     15        $update_time = $CFG->mintimebetweenrssupdate; 
    1816    } else if ($subscribers > 5) { 
    19         $update_time = 4800
     17        $update_time = $CFG->mintimebetweenrssupdate * 2
    2018    } else if ($subscribers > 1) { 
    21         $update_time = 7200
     19        $update_time = $CFG->mintimebetweenrssupdate * 4
    2220    } else { 
    23         $update_time = 14400
    24     } */ 
     21        $update_time = $CFG->mintimebetweenrssupdate * 8
     22    } 
    2523     
    26     // TODO: adjust system so the presence of tons of feeds with few subscribers 
    27     // doesn't clog up the cron 
    28     $update_time = 3600; 
    29  
    3024    $timenow = time(); 
    3125     
  • devel/units/magpie/function_update_all_cron.php

    r702 r773  
    11<?php 
     2global $CFG; 
    23 
    34// $parameter = the ID number of the user 
     
    78 
    89// Get all subscriptions 
    9 if ($subscriptions = get_records_select('feeds','last_updated <= ',array(time() - 300))) { 
     10if ($subscriptions = get_records_select('feeds','last_updated <= ',array(time() - $CFG->mintimebetweenrssupdate))) { 
    1011    foreach($subscriptions as $subscription) { 
    1112        run("rss:update",$subscription->ident);