瀏覽代碼

输出调试信息

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; //调试代码
             }
         }