AI Assistant 6 달 전
부모
커밋
90bf0435d7
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/Module/DelayQueue/Redis.php

+ 2 - 1
app/Module/DelayQueue/Redis.php

@@ -32,7 +32,8 @@ class Redis
         if ($a->exists($key)) {
             return 0;
         }
-        $a->setex($key, $delay, 1);
+        $delay= max(2, $delay);
+        $a->setex($key, max(1,$delay-1), 1);
 
         $q            = new Queue();
         $q->create_ts = time();