v2.4.0+
Status: | effective |
Progress: | 95% |
Version: | 2.4.0+ |
Table of Contents | |
---|---|
This page advises on doing maintenance by using a shell script to work on the jobs piped into a job queue by Semantic MediaWiki, but also by MediaWiki itself and other extensions relying on jobs.
Scripts[edit]
Set $wgJobRunRate = 0;
in your "LocalSettings.php" file and create the script in a file called "runJobs0.sh"1 or alternatively "runJobs1.sh"2
- runJobs0.sh
#!/bin/bash
# will be executed by a cron-job
MEDIAWIKI=/path/to/your/mediawiki
RUNNING=$(ps aux | grep /mediawiki/maintenance/runJobs.php | grep maxjobs)
if [ -z $RUNNING ];
then su XXX -c "php $MEDIAWIKI/maintenance/runJobs.php --maxjobs=999";
fi
- runJobs1.sh
#!/bin/bash
# will be executed by a cron-job
date >> /var/log/httpd/cron
if pgrep -f "php /var/www/html/w/maintenance/runJobs.php -q --memory-limit=max --wait" > /dev/null
then
echo "runJobs running." >> /var/log/httpd/cron
kill `pgrep -f "php /var/www/html/w/maintenance/runJobs.php -q --memory-limit=max --wait"`
fi
echo "runJobs stopped. Restarting..." >> /var/log/httpd/cron
php /var/www/html/w/maintenance/runJobs.php -q --memory-limit=max --wait >> /var/log/httpd/cron 2>&1 &
MediaWiki[edit]
- JobQueueRedis and SMW is reported to fail with "JobQueueRedis.php: Redis server error: Could not insert 1 htmlCacheUpdate job(s)" issue
- mws:JobQueue
Discussions[edit]
- MediaWiki Job queue problem about "stuck" Jobs
- SMW UpdateJob error
- Job queue affecting semantic queries in MW 1.22
- many runjobs about 7000 jobs (refreshLinksDynamic) after a day
Configuration[edit]
- $smwgEnableUpdateJobs (Sets whether tasks are deferred until after a page was edited by using the job queue)
- $smwgPostEditUpdate (Sets how many jobs should be executed as part of a post-edit event)
- $smwgEnabledDeferredUpdate (Sets whether updates to pages are queued and executed after edits)
- $smwgFulltextDeferredUpdate (Sets the number of expected full-text search index updates)
See also[edit]
- Help page about
UpdateJob
handler