Browse Source

输出调试信息

visuddhinanda 2 năm trước cách đây
mục cha
commit
0b4a9aff38
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  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; //调试代码
             }
         }