r47699 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47698‎ | r47699 | r47700 >
Date:10:04, 23 February 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Package for MediaWiki job queue runners
Modified paths:
  • /trunk/debs/wikimedia-job-runner (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/changelog (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/compat (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/control (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/rules (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/wikimedia-job-runner.mw-job-runner.default (added) (history)
  • /trunk/debs/wikimedia-job-runner/debian/wikimedia-job-runner.mw-job-runner.init (added) (history)

Diff [purge]

Index: trunk/debs/wikimedia-job-runner/debian/control
@@ -0,0 +1,8 @@
 2+Source: wikimedia-job-runner
 3+Maintainer: Tim Starling <tstarling@wikimedia.org>
 4+
 5+Package: wikimedia-job-runner
 6+Architecture: all
 7+Depends: wikimedia-task-appserver
 8+Description: MediaWiki job queue runner
 9+
Index: trunk/debs/wikimedia-job-runner/debian/compat
@@ -0,0 +1 @@
 2+7
Index: trunk/debs/wikimedia-job-runner/debian/wikimedia-job-runner.mw-job-runner.init
@@ -0,0 +1,53 @@
 2+#!/bin/bash
 3+
 4+### BEGIN INIT INFO
 5+# Provides: mw-job-runner
 6+# Required-Start: $local_fs $network $named $remote_fs $syslog $time
 7+# Short-Description: MediaWiki job queue runner
 8+### END INIT INFO
 9+
 10+. /lib/lsb/init-functions
 11+
 12+JR_USER=apache
 13+JR_NICE=20
 14+JR_SCRIPT=/usr/local/apache/common/php-1.5/maintenance/jobs-loop.sh
 15+JR_PID_FILE=/var/run/mw-jobs.pid
 16+
 17+# PHP must exist
 18+test -x /usr/bin/php || exit 0
 19+# The script must exist
 20+test -x $JR_SCRIPT || exit 0
 21+
 22+# Source defaults
 23+test -f /etc/default/mw-job-runner && source /etc/default/mw-job-runner
 24+
 25+case "$1" in
 26+ start)
 27+ log_daemon_msg "Starting MediaWiki job runner"
 28+ start-stop-daemon --start --background --quiet \
 29+ --chuid $JR_USER --nicelevel $JR_NICE \
 30+ --make-pidfile --pidfile $JR_PID_FILE \
 31+ --startas $JR_SCRIPT
 32+ log_end_msg $?
 33+ ;;
 34+ stop)
 35+ log_daemon_msg "Stopping MediaWiki job runner"
 36+ start-stop-daemon --stop --quiet --pidfile $JR_PID_FILE --retry 60
 37+ log_end_msg $?
 38+ ;;
 39+ restart|reload|force-reload)
 40+ log_daemon_msg "Restarting MediaWiki job runner"
 41+ start-stop-daemon --stop --quiet --pidfile $JR_PID_FILE --retry 60
 42+ start-stop-daemon --start --background --quiet \
 43+ --chuid $JR_USER --nicelevel $JR_NICE \
 44+ --make-pidfile --pidfile $JR_PID_FILE \
 45+ --startas $JR_SCRIPT
 46+ log_end_msg $?
 47+ ;;
 48+ *)
 49+ log_action_msg "Usage: /etc/init.d/mw-job-runner {start|stop|restart|reload|force-reload}"
 50+ exit 2
 51+ ;;
 52+esac
 53+
 54+exit 0
Index: trunk/debs/wikimedia-job-runner/debian/wikimedia-job-runner.mw-job-runner.default
@@ -0,0 +1,5 @@
 2+JR_USER=apache
 3+JR_NICE=20
 4+JR_SCRIPT=/usr/local/apache/common/php-1.5/maintenance/jobs-loop.sh
 5+JR_PID_FILE=/var/run/mw-jobs.pid
 6+
Index: trunk/debs/wikimedia-job-runner/debian/changelog
@@ -0,0 +1,5 @@
 2+wikimedia-job-runner (1.0) hardy; urgency=low
 3+
 4+ * Initial release.
 5+
 6+ -- Tim Starling <tstarling@wikimedia.org> Mon, 23 Feb 2009 19:59:22 +1100
Index: trunk/debs/wikimedia-job-runner/debian/rules
@@ -0,0 +1,24 @@
 2+#!/usr/bin/make -f
 3+
 4+build:
 5+
 6+binary: binary-indep
 7+binary-arch:
 8+
 9+binary-indep:
 10+ dh_testdir
 11+ dh_testroot
 12+ dh_installchangelogs
 13+ dh_installinit --name=mw-job-runner
 14+ dh_installdeb
 15+ dh_gencontrol
 16+ dh_md5sums
 17+ dh_builddeb
 18+
 19+clean:
 20+ dh_testdir
 21+ dh_testroot
 22+ dh_clean
 23+
 24+.PHONY: build binary binary-indep binary-arch clean
 25+
Property changes on: trunk/debs/wikimedia-job-runner/debian/rules
___________________________________________________________________
Name: svn:executable
126 + *

Status & tagging log