Procházet zdrojové kódy

tweak daemon2 to run feedbrowser/etc tasks after update randomly, not instead of update

Andrew Dolgov před 11 roky
rodič
revize
842c2ab451
1 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 6 6
      update_daemon2.php

+ 6 - 6
update_daemon2.php

@@ -244,15 +244,15 @@
 					}
 
 					// Call to the feed batch update function
-					// or regenerate feedbrowser cache
+					// and maybe regenerate feedbrowser cache
 
 					$nf = 0;
 
-					if (rand(0,100) > 30) {
-						_debug("Waiting before update..");
-						sleep(rand(5,15));
-						$nf = update_daemon_common($link);
-					} else {
+					_debug("Waiting before update..");
+					sleep(rand(5,15));
+					$nf = update_daemon_common($link);
+
+					if (rand(0,100) > 50) {
 						$count = update_feedbrowser_cache($link);
 						_debug("Feedbrowser updated, $count feeds processed.");