소스 검색

输出调试信息

visuddhinanda 2 년 전
부모
커밋
0b4a9aff38
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      app/Console/Commands/UpgradeChapterDynamicWeekly.php

+ 8 - 2
app/Console/Commands/UpgradeChapterDynamicWeekly.php

@@ -77,10 +77,13 @@ class UpgradeChapterDynamicWeekly extends Command
                              ->count();
                 $progress[] = $count;
             }
-            Cache::put("/chapter_dynamic/{$chapter->book}/{$chapter->para}/global",$progress,3600*24*7);
+            $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/global";
+            Cache::put($key,$progress,3600*24*7);
             $bar->advance();
 
             if($this->option('test')){
+                $this->info("key:{$key}");
+                print_r($progress);
                 break; //调试代码
             }
         }
@@ -122,10 +125,13 @@ class UpgradeChapterDynamicWeekly extends Command
                              ->count();
                 $progress[] = $count;
             }
-            Cache::put("/chapter_dynamic/{$chapter->book}/{$chapter->para}/ch_{$chapter->channel_id}",$progress,3600*24*7);
+            $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/ch_{$chapter->channel_id}";
+            Cache::put($key,$progress,3600*24*7);
             $bar->advance();
 
             if($this->option('test')){
+                $this->info("key:{$key}");
+                print_r($progress);
                 break; //调试代码
             }
         }