Make RecentChangesUpdateJob::updateActiveUsers more robust
authorMarius Hoch <hoo@online.de>
Tue, 31 Jan 2017 09:39:56 +0000 (10:39 +0100)
committerMarius Hoch <hoo@online.de>
Tue, 31 Jan 2017 10:06:59 +0000 (11:06 +0100)
commitbf8c90538dff567efc455fafa18ac2dc4015b246
treeb8cbfa4f1422de9074999fa6a4dd9a700a037375
parent830a60aa827cdb44af17452e6b82e1065e00d8ad
Make RecentChangesUpdateJob::updateActiveUsers more robust

Do work we can outside of the lock (purge no longer active users)
and fail more gracefully if the lock is taken (if this is the case,
we're probably on a high traffic wiki, so this job is going to
run very often anyway, so no need to warn).

Given this is an asynchronous job people can't expect this to be
always fully consistent with the actual state of the RC table anyway.

Note: This will still sometimes log the warning (if we have a race
between Database::lockIsFree and Database::lock), but that should be
negligible.

Bug: T156638
Change-Id: I2e49a8e12bc64156d64a32ccf54911a76087346a
includes/jobqueue/jobs/RecentChangesUpdateJob.php