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