JobQueueGroup: Allow readOnlyReason to be specified per JQ type
authorMarko Obrovac <mobrovac@wikimedia.org>
Thu, 19 Jul 2018 16:13:38 +0000 (18:13 +0200)
committerMarko Obrovac <mobrovac@wikimedia.org>
Thu, 19 Jul 2018 16:13:38 +0000 (18:13 +0200)
commita5aa44567b3312401d6dcb0ffc9706da7e81c629
tree844f1a2de1db4be89b7b2b0ef01aac25c4d8d669
parent3e83cc276aa498fbf5786a1f9bdd6285fa03cdc9
JobQueueGroup: Allow readOnlyReason to be specified per JQ type

We use $wgReadOnly for various reasons, one of which is to disallow
writes in the currently-non-active DC. However, we should allow the
readOnlyReason configuration variable to be available per JobQueue type
and have it the code respect that.

In our current set-up, we use JobQueueEventBus which ever only uses the
enqueue execution path and does not depend upon which DC it is executed
in, so this will allow us to enqueue jobs in both DCs.

Note that this is an alternative approach to the one outlined in
Ibbad6063b6b154d7f7d172c79f7be324bf80eb7e

Bug: T199594
Change-Id: I8f1a57a81ea11c1c587c0057fa8bb3454b0e0b56
includes/jobqueue/JobQueueGroup.php