mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
reAnnounce log use info hash hex
This commit is contained in:
@@ -57,7 +57,8 @@ if ($redis->get("$torrentNotExistsKey:$info_hash")) {
|
||||
do_log("[ANNOUNCE] $msg");
|
||||
err($msg);
|
||||
}
|
||||
$torrentReAnnounceKey = sprintf('reAnnounceCheckByInfoHash:%s:%s', $userAuthenticateKey, $info_hash);
|
||||
$infoHashHex = sha1($info_hash);
|
||||
$torrentReAnnounceKey = sprintf('reAnnounceCheckByInfoHash:%s:%s', $userAuthenticateKey, $infoHashHex);
|
||||
if (!$isStoppedOrCompleted && !$isReAnnounce && !$redis->set($torrentReAnnounceKey, TIMENOW, ['nx', 'ex' => $frequencyInterval])) {
|
||||
$msg = "Request too frequent(h)";
|
||||
do_log(sprintf("[ANNOUNCE] %s key: %s already exists, value: %s", $msg, $torrentReAnnounceKey, TIMENOW));
|
||||
|
||||
Reference in New Issue
Block a user