Skip to content
Permalink
Browse files

do not break php-fpm when running cronjobs

  • Loading branch information
FlorianSW committed Feb 13, 2020
1 parent bebd1c8 commit ea37802a97e31751821e6c1093d451ef87e8acc9
Showing with 3 additions and 3 deletions.
  1. +2 −2 modules/role/manifests/datawiki.pp
  2. +1 −1 modules/role/manifests/mediawiki.pp
@@ -5,15 +5,15 @@
# This handles inserting jobs into client job queue, which then process the changes
cron { 'datawiki-dispatch-changes':
ensure => present,
command => 'docker run -it --rm --net=host -u www-data:www-data -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php /data/mediawiki/mw-config/mw-config/multiversion/MWScript.php extensions/Wikibase/repo/maintenance/dispatchChanges.php --wiki datawiki --max-time 540 --batch-size 275 --dispatch-interval 25 >/dev/null 2>&1',
command => 'docker run -it --rm --net=host -u $(id -u www-data) -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php /data/mediawiki/mw-config/mw-config/multiversion/MWScript.php extensions/Wikibase/repo/maintenance/dispatchChanges.php --wiki datawiki --max-time 540 --batch-size 275 --dispatch-interval 25 >/dev/null 2>&1',
user => 'root',
minute => '*/3',
}

# Prune wb_changes entries no longer needed from (test)wikidata
cron { 'datawiki-prune':
ensure => present,
command => 'docker run -it --rm --net=host -u www-data:www-data -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php /data/mediawiki/mw-config/mw-config/multiversion/MWScript.php extensions/Wikibase/repo/maintenance/pruneChanges.php --wiki datawiki --number-of-days=3 >> /data/log/mediawiki/prune.log 2>&1',
command => 'docker run -it --rm --net=host -u $(id -u www-data) -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php /data/mediawiki/mw-config/mw-config/multiversion/MWScript.php extensions/Wikibase/repo/maintenance/pruneChanges.php --wiki datawiki --number-of-days=3 >> /data/log/mediawiki/prune.log 2>&1',
user => 'root',
minute => [0,15,30,45],
}
@@ -59,7 +59,7 @@

$wikis.each |Integer $index, String $dbname| {
cron { "cron-updatespecialpages-${dbname}":
command => "docker run -it --rm --net=host -u www-data:www-data -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php mw-config/mw-config/multiversion/MWScript.php updateSpecialPages.php --wiki=${dbname} --override > /data/log/mediawiki/updateSpecialPages-${dbname}.log 2>&1",
command => "docker run -it --rm --net=host -u $(id www-data) -v /data:/data -w /data/mediawiki droidwiki/php-fpm:7.4 php mw-config/mw-config/multiversion/MWScript.php updateSpecialPages.php --wiki=${dbname} --override > /data/log/mediawiki/updateSpecialPages-${dbname}.log 2>&1",
user => 'root',
monthday => [8, 22],
}

0 comments on commit ea37802

Please sign in to comment.
You can’t perform that action at this time.