return false;
}
- if ( $db->insert( 'updatelog', [ 'ul_key' => $key ], __METHOD__, 'IGNORE' ) ) {
- return true;
- } else {
- $this->output( $this->updatelogFailedMessage() . "\n" );
+ $db->insert( 'updatelog', [ 'ul_key' => $key ], __METHOD__, 'IGNORE' );
- return false;
- }
+ return true;
}
/**
return "Update '{$key}' already logged as completed.";
}
- /**
- * Message to show that the update log was unable to log the completion of this update
- * @return string
- */
- protected function updatelogFailedMessage() {
- $key = $this->getUpdateKey();
-
- return "Unable to log update '{$key}' as completed.";
- }
-
/**
* Do the actual work. All child classes will need to implement this.
* Return true to log the update as done or false (usually on failure).
usleep( $throttle * 1000 );
}
- if ( $dbw->insert(
+ $dbw->insert(
'updatelog',
[ 'ul_key' => 'populate category' ],
__METHOD__,
'IGNORE'
- ) ) {
- $this->output( "Category population complete.\n" );
-
- return true;
- } else {
- $this->output( "Could not insert category population row.\n" );
+ );
- return false;
- }
+ return true;
}
}