MediaWiki
REL1_23
|
Maintenance script that runs pending jobs. More...
Public Member Functions | |
__construct () | |
execute () | |
memoryLimit () | |
Normally we disable the memory_limit when running admin scripts. | |
Private Member Functions | |
assertMemoryOK () | |
Make sure that this script is not too close to the memory usage limit. | |
getBackoffTimeToWait (Job $job) | |
loadBackoffs () | |
Get the previous backoff expiries from persistent storage. | |
runJobsLog ($msg) | |
Log the job message. | |
syncBackoffs (array $backoffs) | |
Merge the current backoff expiries from persistent storage. |
Maintenance script that runs pending jobs.
Definition at line 31 of file runJobs.php.
Reimplemented from Maintenance.
Definition at line 32 of file runJobs.php.
References Maintenance\addOption().
RunJobs::assertMemoryOK | ( | ) | [private] |
Make sure that this script is not too close to the memory usage limit.
It is better to die in between jobs than OOM right in the middle of one.
MWException |
Definition at line 244 of file runJobs.php.
Referenced by execute().
RunJobs::execute | ( | ) |
Reimplemented from Maintenance.
Definition at line 50 of file runJobs.php.
References $count, $e, $error, $flags, $job, $t, array(), assertMemoryOK(), Maintenance\error(), getBackoffTimeToWait(), Maintenance\getOption(), Maintenance\hasOption(), loadBackoffs(), MWException\report(), MWExceptionHandler\rollbackMasterChangesAndLog(), runJobsLog(), JobQueueGroup\singleton(), syncBackoffs(), JobQueueGroup\TYPE_DEFAULT, JobQueueGroup\USE_CACHE, wfProfileIn(), wfProfileOut(), wfReadOnly(), and wfWaitForSlaves().
RunJobs::getBackoffTimeToWait | ( | Job $ | job | ) | [private] |
Job | $job |
Definition at line 173 of file runJobs.php.
References Job\getType(), global, and Job\workItemCount().
Referenced by execute().
RunJobs::loadBackoffs | ( | ) | [private] |
Get the previous backoff expiries from persistent storage.
Definition at line 199 of file runJobs.php.
References $file, $section, array(), and wfTempDir().
Referenced by execute().
Normally we disable the memory_limit when running admin scripts.
Some scripts may wish to actually set a limit, however, to avoid blowing up unexpectedly. We also support a --memory-limit option, to allow sysadmins to explicitly set one if they'd prefer to override defaults (or for people using Suhosin which yells at you for trying to disable the limits)
Reimplemented from Maintenance.
Definition at line 42 of file runJobs.php.
References Maintenance\hasOption().
RunJobs::runJobsLog | ( | $ | msg | ) | [private] |
Log the job message.
$msg | String The message to log |
Definition at line 266 of file runJobs.php.
References Maintenance\output(), wfDebugLog(), and wfTimestamp().
Referenced by execute().
RunJobs::syncBackoffs | ( | array $ | backoffs | ) | [private] |
Merge the current backoff expiries from persistent storage.
array | $backoffs | Map of (job type => backoff expiry timestamp) |
Definition at line 221 of file runJobs.php.
References $file, $section, $timestamp, array(), as, and wfTempDir().
Referenced by execute().