xielin 5 yıl önce
ebeveyn
işleme
f3fbbd17d7
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      app/Console/Commands/PostCreate.php

+ 2 - 1
app/Console/Commands/PostCreate.php

@@ -52,8 +52,9 @@ class PostCreate extends Command
         foreach ($posts as $post) {
             $row = $this->postRepositories->createPost(json_decode($post,true));
             Log::debug(date("Y-m-d H:i:s") . "创建帖子:" . json_encode($row));
+            Redis::srem($key,json_encode($post));
         }
-        Redis::srem($key,json_encode($post));
+
         $this->line(date('Y-m-d H:i:s').' 创建帖子结束');
     }
 }