MediaWiki master
RunnableJob.php
Go to the documentation of this file.
1<?php
36interface RunnableJob extends IJobSpecification {
38 public const JOB_NO_EXPLICIT_TRX_ROUND = 1;
39
53 public function run();
54
59 public function getMetadata( $field = null );
60
66 public function setMetadata( $field, $value );
67
73 public function hasExecutionFlag( $flag );
74
81 public function getRequestId();
82
92 public function allowRetries();
93
99 public function workItemCount();
100
105 public function getReadyTimestamp();
106
112 public function tearDown( $status );
113
117 public function getLastError();
118
122 public function toString();
123}
Interface for serializable objects that describe a job queue task.
Job that has a run() method and metadata accessors for JobQueue::pop() and JobQueue::ack().
getMetadata( $field=null)
allowRetries()
Whether to retry execution of this job if run() returned false or threw an exception.
tearDown( $status)
Do any final cleanup after run(), deferred updates, and all DB commits happen.
setMetadata( $field, $value)
hasExecutionFlag( $flag)
run()
Run the job.