diff --git a/src/Sync/NodaPersinstFulltextSyncManticore.php b/src/Sync/NodaPersinstFulltextSyncManticore.php index e56eb94..b94249f 100644 --- a/src/Sync/NodaPersinstFulltextSyncManticore.php +++ b/src/Sync/NodaPersinstFulltextSyncManticore.php @@ -11,7 +11,7 @@ declare(strict_types = 1); */ 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. @@ -188,6 +188,10 @@ final class NodaPersinstFulltextSyncManticore { $mysqli_manticore->commit(); + if (PHP_SAPI === 'cli' && $mysqli_noda->ping() === false) { + $mysqli_noda->reconnect(); + } + // Sync translations $result = $mysqli_noda->do_read_query("SELECT `persinst`.`persinst_id`, `trans_language`, diff --git a/src/Sync/NodaTagFulltextSyncManticore.php b/src/Sync/NodaTagFulltextSyncManticore.php index e889e4a..532e6af 100644 --- a/src/Sync/NodaTagFulltextSyncManticore.php +++ b/src/Sync/NodaTagFulltextSyncManticore.php @@ -11,7 +11,7 @@ declare(strict_types = 1); */ 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. @@ -139,6 +139,10 @@ final class NodaTagFulltextSyncManticore { /** * 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 */ public static function runFullSyncForBaseEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void { @@ -189,6 +193,10 @@ final class NodaTagFulltextSyncManticore { /** * 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 */ public static function runFullSyncForTranslatedEntries(MDMysqli $mysqli_noda, MDMysqli $mysqli_manticore, string $databasename):void {