mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
add prefix to cleanup batch job ids key
This commit is contained in:
@@ -13,6 +13,8 @@ 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 IDS_KEY_PREFIX = "cleanup_batch_job_ids:";
|
||||
|
||||
private static array $batchKeyActionsMap = [
|
||||
self::USER_SEED_BONUS_BATCH_KEY => [
|
||||
'action' => 'seed_bonus',
|
||||
@@ -96,7 +98,7 @@ class CleanupRepository extends BaseRepository
|
||||
while($arr_keys = $redis->hScan($batch, $it, "*", self::$scanSize)) {
|
||||
$delay = self::getDelay($batchKeyInfo['task_index'], $length, $page);
|
||||
$idStr = implode(",", array_keys($arr_keys));
|
||||
$idRedisKey = Str::random();
|
||||
$idRedisKey = self::IDS_KEY_PREFIX + Str::random();
|
||||
NexusDB::cache_put($idRedisKey, $idStr);
|
||||
$command = sprintf(
|
||||
'cleanup --action=%s --begin_id=%s --end_id=%s --id_redis_key=%s --request_id=%s --delay=%s',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-11-15');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-02-22');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
Reference in New Issue
Block a user