Changeset 773
- Timestamp:
- 12/22/06 17:26:17 (2 years ago)
- Files:
-
- devel/units/magpie/function_init.php (modified) (1 diff)
- devel/units/magpie/function_update.php (modified) (1 diff)
- devel/units/magpie/function_update_all_cron.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/units/magpie/function_init.php
r767 r773 11 11 } 12 12 13 if (empty($CFG->mintimebetweenrssupdate)) { 14 $CFG->mintimebetweenrssupdate = 1800; 15 } 16 13 17 define('rss','true'); 14 18 define('MAGPIE_DIR', $CFG->dirroot . "units/magpie/"); devel/units/magpie/function_update.php
r702 r773 12 12 if (!empty($feed) && !empty($subscribers)) { 13 13 14 $update_time = 1; 15 16 /* if ($subscribers > 10) { 17 $update_time = 3600; 14 if ($subscribers > 10) { 15 $update_time = $CFG->mintimebetweenrssupdate; 18 16 } else if ($subscribers > 5) { 19 $update_time = 4800;17 $update_time = $CFG->mintimebetweenrssupdate * 2; 20 18 } else if ($subscribers > 1) { 21 $update_time = 7200;19 $update_time = $CFG->mintimebetweenrssupdate * 4; 22 20 } else { 23 $update_time = 14400;24 } */21 $update_time = $CFG->mintimebetweenrssupdate * 8; 22 } 25 23 26 // TODO: adjust system so the presence of tons of feeds with few subscribers27 // doesn't clog up the cron28 $update_time = 3600;29 30 24 $timenow = time(); 31 25 devel/units/magpie/function_update_all_cron.php
r702 r773 1 1 <?php 2 global $CFG; 2 3 3 4 // $parameter = the ID number of the user … … 7 8 8 9 // Get all subscriptions 9 if ($subscriptions = get_records_select('feeds','last_updated <= ',array(time() - 300))) {10 if ($subscriptions = get_records_select('feeds','last_updated <= ',array(time() - $CFG->mintimebetweenrssupdate))) { 10 11 foreach($subscriptions as $subscription) { 11 12 run("rss:update",$subscription->ident);
