File tree 3 files changed +40
-0
lines changed
3 files changed +40
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ MW_INSTALL_PATH=/usr/share/webapps/mediawiki
4
+ RUNJOBS=$MW_INSTALL_PATH /maintenance/runJobs.php
5
+ while true ; do
6
+ # Job types that need to be run ASAP no matter how many of them are in the queue
7
+ # Those jobs should be very "cheap" to run
8
+ php $RUNJOBS -q --type=" enotifNotify"
9
+ # Everything else, limit the number of jobs on each batch
10
+ # The --wait parameter will pause the execution here until new jobs are added,
11
+ # to avoid running the loop without anything to do
12
+ php $RUNJOBS -q --wait --maxjobs=20
13
+ # Wait some seconds to let the CPU do other things, like handling web requests, etc
14
+ sleep 10
15
+ done
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =MediaWiki Job runner
3
+ After =php-fpm.service postgresql.service
4
+
5
+ [Service]
6
+ ExecStart =/usr/local/bin/mwjobrunner
7
+ Type =exec
8
+ Nice =10
9
+ User =http
10
+ OOMScoreAdjust =200
11
+ Restart =on-failure
12
+
13
+ # from php-fpm.service
14
+ PrivateTmp =true
15
+ ProtectSystem =full
16
+ PrivateDevices =true
17
+ ProtectKernelModules =true
18
+ ProtectKernelTunables =true
19
+ ProtectControlGroups =true
20
+ RestrictRealtime =true
21
+ RestrictAddressFamilies =AF_INET AF_INET6 AF_NETLINK AF_UNIX
22
+ RestrictNamespaces =true
23
+
24
+ [Install]
25
+ WantedBy =multi-user.target
You can’t perform that action at this time.
0 commit comments