Browse Source

add database optimization settings

main
ghost 2 years ago
parent
commit
45c4f7b7b0
  1. 7
      config/app.php.txt
  2. 5
      crontab/cleaner.php

7
config/app.php.txt

@ -384,6 +384,13 @@ define('CLEAN_PAGE_BAN_SECONDS_OFFSET', 60*60*24*30);
*/ */
define('CLEAN_PAGE_DESCRIPTION_OFFSET', 60*60*24*30*12*10); define('CLEAN_PAGE_DESCRIPTION_OFFSET', 60*60*24*30*12*10);
/*
* Run database tables optimization
*
* When enabled - may reduce disk space usage but requires enough of RAM
*
*/
define('CLEAN_DB_TABLES_OPTIMIZATION', true);
// API settings // API settings

5
crontab/cleaner.php

@ -253,7 +253,10 @@ try {
$db->commit(); $db->commit();
// Optimize tables // Optimize tables
$db->optimize(); if (CLEAN_DB_TABLES_OPTIMIZATION) {
$db->optimize();
}
} catch(Exception $e) { } catch(Exception $e) {

Loading…
Cancel
Save