From 2bccfe58c8aa77752c9ec41a6086299fdc4a4148 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 10 Jul 2023 02:41:38 +0800 Subject: [PATCH] update batch key suffix --- app/Repositories/CleanupRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Repositories/CleanupRepository.php b/app/Repositories/CleanupRepository.php index aacd4142..9ba411da 100644 --- a/app/Repositories/CleanupRepository.php +++ b/app/Repositories/CleanupRepository.php @@ -36,7 +36,7 @@ class CleanupRepository extends BaseRepository return; } //update the batch key - $redis->set($batchKey, $batchKey . self::getHashKeySuffix()); + $redis->set($batchKey, $batchKey . ":" . self::getHashKeySuffix()); $count = match ($batchKey) { self::USER_SEEDING_LEECHING_TIME_BATCH_KEY => self::updateUserLeechingSeedingTime($redis, $batch, $logPrefix), self::TORRENT_SEEDERS_ETC_BATCH_KEY => self::updateTorrentSeedersEtc($redis, $batch, $logPrefix), @@ -150,7 +150,7 @@ for k, v in pairs(batchList) do local batchKey = redis.call("GET", v) local isBatchKeyNew = false if batchKey == false then - batchKey = v .. ARGV[3] + batchKey = v .. ":" .. ARGV[3] redis.call("SET", v, batchKey, "EX", 2592000) isBatchKeyNew = true end @@ -170,7 +170,7 @@ LUA; private static function getHashKeySuffix(): string { - return ":" . date('Ymd_His'); + return date('Ymd_His'); } }