瀏覽代碼

sleep(2);

visuddhinanda 3 年之前
父節點
當前提交
5477f7c0fb
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/Console/Commands/UpgradeChapterDynamicWeekly.php

+ 4 - 0
app/Console/Commands/UpgradeChapterDynamicWeekly.php

@@ -58,6 +58,7 @@ class UpgradeChapterDynamicWeekly extends Command
         }
         $chapters = $table->get();
         $bar = $this->output->createProgressBar(count($chapters));
+
         foreach ($chapters as $key => $chapter) {
             #章节长度
             $paraEnd = PaliText::where('book',$chapter->book)
@@ -79,7 +80,9 @@ class UpgradeChapterDynamicWeekly extends Command
             }
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/global";
             Cache::put($key,$progress,3600*24*7);
+
             $bar->advance();
+            sleep(2);
 
             if($this->option('test')){
                 $this->info("key:{$key}");
@@ -130,6 +133,7 @@ class UpgradeChapterDynamicWeekly extends Command
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/ch_{$chapter->channel_id}";
             Cache::put($key,$progress,3600*24*7);
             $bar->advance();
+            sleep(2);
 
             if($this->option('test')){
                 $this->info("key:{$key}");