Manual:Job queue/For developers

To use the to do your deferred updates, you need to do these things:

Create a Job subclass
You need to create a class, that, given parameters and a Title, will perform your deferred updates

Add your Job class to the global list
Add the Job class to the global $wgJobClasses array. In extensions, this is usually done in the main extension file, e.g. . Make sure the key name is unique.

If your extension uses extension.json descriptor, you can use its section :

Job queue type
A job queue type is the command name you give to the parent::__construct method of your job class; e.g., using the example above, that would be synchroniseThreadArticleData.

getQueueSizes
will return an array of all job queue types and their sizes.

getSize
While  is handy for analysing the entire job queue, for performance reasons, it’s best to use   when analysing a specific job type, which will only return the job queue size of that specific job type.