From a91060636f93c8f7b62f54fc3d8a05d908a9e171 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 28 Jul 2023 02:28:05 +0800 Subject: [PATCH] increase batch lifetime --- app/Repositories/CleanupRepository.php | 4 +--- include/constants.php | 2 +- public/search.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Repositories/CleanupRepository.php b/app/Repositories/CleanupRepository.php index a0ccd4bd..606dbf7b 100644 --- a/app/Repositories/CleanupRepository.php +++ b/app/Repositories/CleanupRepository.php @@ -12,8 +12,6 @@ class CleanupRepository extends BaseRepository const USER_SEEDING_LEECHING_TIME_BATCH_KEY = "batch_key:user_seeding_leeching_time"; const TORRENT_SEEDERS_ETC_BATCH_KEY = "batch_key:torrent_seeders_etc"; - const KEY_LIFETIME = 3600*3; - private static array $batchKeyActionsMap = [ self::USER_SEED_BONUS_BATCH_KEY => [ 'action' => 'seed_bonus', @@ -203,7 +201,7 @@ LUA; private static function getCacheKeyLifeTime(): int { - $value = get_setting("main.autoclean_interval_three"); + $value = get_setting("main.autoclean_interval_four"); return intval($value) + 600; } diff --git a/include/constants.php b/include/constants.php index 302aec32..81f24c35 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ 0) { torrenttable(json_decode(json_encode($rows), true)); print($pagerbottom); } else { - stdmsg($lang_torrents['std_search_results_for'] . $search . "\"",$lang_torrents['std_try_again']); + stdmsg($lang_torrents['std_search_results_for'] . htmlspecialchars($search) . "\"",$lang_torrents['std_try_again']); } print(""); stdfoot();