[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Job queue task base code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 350 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
factory( $command, Title $title, $params = false ) X-Ref |
Create the appropriate object to handle a specific job param: string $command Job command param: Title $title Associated title param: array|bool $params Job parameters return: Job |
batchInsert( $jobs ) X-Ref |
Batch-insert a group of jobs into the queue. This will be wrapped in a transaction with a forced commit. This may add duplicate at insert time, but they will be removed later on, when the first one is popped. param: array $jobs Array of Job objects return: bool |
safeBatchInsert( $jobs ) X-Ref |
Insert a group of jobs into the queue. Same as batchInsert() but does not commit and can thus be rolled-back as part of a larger transaction. However, large batches of jobs can cause slave lag. param: array $jobs Array of Job objects return: bool |
pop_type( $type ) X-Ref |
Pop a job of a certain type. This tries less hard than pop() to actually find a job; it may be adversely affected by concurrent job runners. param: string $type return: Job|bool Returns false if there are no jobs |
pop() X-Ref |
Pop a job off the front of the queue. This is subject to $wgJobTypesExcludedFromDefaultQueue. return: Job|bool False if there are no jobs |
__construct( $command, $title, $params = false ) X-Ref |
param: string $command param: Title $title param: array|bool $params |
getType() X-Ref |
return: string |
getTitle() X-Ref |
return: Title |
getParams() X-Ref |
return: array |
getReleaseTimestamp() X-Ref |
return: int|null UNIX timestamp to delay running this job until, otherwise null |
ignoreDuplicates() X-Ref |
return: bool Whether only one of each identical set of jobs should be run |
allowRetries() X-Ref |
return: bool Whether this job can be retried on failure by job runners |
workItemCount() X-Ref |
return: int Number of actually "work items" handled in this job |
getDeduplicationInfo() X-Ref |
Subclasses may need to override this to make duplication detection work. The resulting map conveys everything that makes the job unique. This is only checked if ignoreDuplicates() returns true, meaning that duplicate jobs are supposed to be ignored. return: array Map of key/values |
newRootJobParams( $key ) X-Ref |
param: string $key A key that identifies the task return: array Map of: |
getRootJobParams() X-Ref |
return: array |
hasRootJobParams() X-Ref |
return: bool |
insert() X-Ref |
Insert a single job into the queue. return: bool True on success |
toString() X-Ref |
return: string |
setLastError( $error ) X-Ref |
No description |
getLastError() X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |