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();