From 431b819fcfd5422904451ff7b36d28f9feb30c39 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 5 Aug 2022 04:12:49 +0300 Subject: [PATCH] mediawiki: improve Job runner setup --- cookbooks/mediawiki/recipes/default.rb | 1 + cookbooks/mediawiki/resources/site.rb | 5 ++--- .../mediawiki/templates/default/LocalSettings.php.erb | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 0d15cdef4..77aa6f696 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -40,6 +40,7 @@ package %w[ php-zip composer unzip + ffmpeg ] # Mediawiki enhanced difference engine diff --git a/cookbooks/mediawiki/resources/site.rb b/cookbooks/mediawiki/resources/site.rb index 62324b5de..263c9337a 100644 --- a/cookbooks/mediawiki/resources/site.rb +++ b/cookbooks/mediawiki/resources/site.rb @@ -205,12 +205,11 @@ action :create do end cron_d "mediawiki-#{cron_name}-refresh-links" do - comment "Run mediawiki refresh links table weekly" + comment "Run mediawiki refresh links table daily" minute "5" hour "0" - weekday "0" user node[:mediawiki][:user] - command "/usr/bin/nice /usr/bin/php -d memory_limit=2048M -d error_reporting=22517 #{site_directory}/w/maintenance/refreshLinks.php --server=https://#{new_resource.site} --memory-limit=2048M --quiet" + command "/usr/bin/nice /usr/bin/php -d memory_limit=2048M -d error_reporting=22517 #{site_directory}/w/maintenance/refreshLinks.php --server=https://#{new_resource.site} --memory-limit=2048M --procs=4 --quiet" end cron_d "mediawiki-#{cron_name}-cleanup-gs" do diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index f50ae6866..1efeb757a 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -239,8 +239,8 @@ $wgDisableCounters = TRUE; # Disable IP in Header to avoid cache issue $wgShowIPinHeader = FALSE; -# Job Runs mostly by cron -$wgJobRunRate = 0.01; +# Job Runs by cron +$wgJobRunRate = 0; # dissolves double redirects automatically $wgFixDoubleRedirects = TRUE; @@ -383,10 +383,7 @@ $wgForceUIMsgAsContentMsg = array( 'mainpage-url', 'mapfeatures-url', 'contribut <% end -%> <% if @name == "wiki.openstreetmap.org" -%> -# setting the search weight of the main wiki's proposal namespace lower then general talk pages (0.2), but -# higher then wiki project namespace (0.1) -# Documentation at https://phabricator.wikimedia.org/source/extension-cirrussearch/browse/master/docs/settings.txt$693 -$wgCirrusSearchNamespaceWeights = array_merge ( $wgCirrusSearchNamespaceWeights, array ( NS_PROPOSAL => 0.15 )); +# Placeholder for the wiki.openstreetmap.org specific config <% end -%> <% if not(@mediawiki[:private_accounts]) and not(@mediawiki[:private_site]) -%> -- 2.39.5