improve cleanup jobs

This commit is contained in:
xiaomlove
2024-11-07 03:35:21 +08:00
parent 22671691aa
commit f1af33c268
4 changed files with 68 additions and 61 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ final class ThirdPartyJob {
public static function addBuyTorrent(int $userId, int $torrentId): void
{
$key = sprintf("%s:%s_%s_%s", self::$queueKey, convertNamespaceToSnake(__METHOD__), $userId, $torrentId);
$key = sprintf("%s:%s_%s", self::$queueKey, $userId, $torrentId);
if (NexusDB::redis()->set($key, now()->toDateTimeString(), ['nx', 'ex' => 3600])) {
$value = [
'name' => self::JOB_BUY_TORRENT,