Ping and reconnect DB in fulltext sync for actors fulltext index
This commit is contained in:
@ -11,7 +11,7 @@ declare(strict_types = 1);
|
|||||||
*/
|
*/
|
||||||
final class NodaPersinstFulltextSyncManticore {
|
final class NodaPersinstFulltextSyncManticore {
|
||||||
|
|
||||||
const FULL_SYNC_COMMIT_AFTER = 30000;
|
private const FULL_SYNC_COMMIT_AFTER = 30000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all names and descriptions in the different languages of a actor.
|
* Returns all names and descriptions in the different languages of a actor.
|
||||||
@ -188,6 +188,10 @@ final class NodaPersinstFulltextSyncManticore {
|
|||||||
|
|
||||||
$mysqli_manticore->commit();
|
$mysqli_manticore->commit();
|
||||||
|
|
||||||
|
if (PHP_SAPI === 'cli' && $mysqli_noda->ping() === false) {
|
||||||
|
$mysqli_noda->reconnect();
|
||||||
|
}
|
||||||
|
|
||||||
// Sync translations
|
// Sync translations
|
||||||
|
|
||||||
$result = $mysqli_noda->do_read_query("SELECT `persinst`.`persinst_id`, `trans_language`,
|
$result = $mysqli_noda->do_read_query("SELECT `persinst`.`persinst_id`, `trans_language`,
|
||||||
|
@ -11,7 +11,7 @@ declare(strict_types = 1);
|
|||||||
*/
|
*/
|
||||||
final class NodaTagFulltextSyncManticore {
|
final class NodaTagFulltextSyncManticore {
|
||||||
|
|
||||||
const FULL_SYNC_COMMIT_AFTER = 30000;
|
private const FULL_SYNC_COMMIT_AFTER = 30000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all names and descriptions in the different languages of a tag.
|
* Returns all names and descriptions in the different languages of a tag.
|
||||||
@ -139,6 +139,10 @@ final class NodaTagFulltextSyncManticore {
|
|||||||
/**
|
/**
|
||||||
* Synchronizes base entries.
|
* Synchronizes base entries.
|
||||||
*
|
*
|
||||||
|
* @param MDMysqli $mysqli_noda Connection to MySQL DB.
|
||||||
|
* @param MDMysqli $mysqli_manticore Connection to Manticore DB.
|
||||||
|
* @param string $databasename Name of the main noda database.
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function runFullSyncForBaseEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void {
|
public static function runFullSyncForBaseEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void {
|
||||||
@ -189,6 +193,10 @@ final class NodaTagFulltextSyncManticore {
|
|||||||
/**
|
/**
|
||||||
* Synchronizes translated entries.
|
* Synchronizes translated entries.
|
||||||
*
|
*
|
||||||
|
* @param MDMysqli $mysqli_noda Connection to MySQL DB.
|
||||||
|
* @param MDMysqli $mysqli_manticore Connection to Manticore DB.
|
||||||
|
* @param string $databasename Name of the main noda database.
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function runFullSyncForTranslatedEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void {
|
public static function runFullSyncForTranslatedEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void {
|
||||||
|
Reference in New Issue
Block a user