Ver código fonte

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

Andrew Dolgov 11 anos atrás
pai
commit
842c2ab451
1 arquivos alterados com 6 adições e 6 exclusões
  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.");