/**
* Abstract base class for update jobs that do something with some secondary
* data extracted from article.
+ *
+ * @note: subclasses should NOT start or commit transactions in their doUpdate() method,
+ * a transaction will automatically be wrapped around the update. If need be,
+ * subclasses can override the beginTransaction() and commitTransaction() methods.
*/
abstract class DataUpdate implements DeferrableUpdate {
*
* @static
* @param $updates array a list of DataUpdate instances
+ * @throws Exception|null
*/
public static function runUpdates( $updates ) {
if ( empty( $updates ) ) return; # nothing to do
$exception = null;
/**
- * @var $update StorageUpdate
- * @var $trans StorageUpdate
+ * @var $update DataUpdate
+ * @var $trans DataUpdate
*/
try {