Browse Source

sleep(2);

visuddhinanda 2 years ago
parent
commit
5477f7c0fb
1 changed files with 4 additions and 0 deletions
  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();
         $chapters = $table->get();
         $bar = $this->output->createProgressBar(count($chapters));
         $bar = $this->output->createProgressBar(count($chapters));
+
         foreach ($chapters as $key => $chapter) {
         foreach ($chapters as $key => $chapter) {
             #章节长度
             #章节长度
             $paraEnd = PaliText::where('book',$chapter->book)
             $paraEnd = PaliText::where('book',$chapter->book)
@@ -79,7 +80,9 @@ class UpgradeChapterDynamicWeekly extends Command
             }
             }
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/global";
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/global";
             Cache::put($key,$progress,3600*24*7);
             Cache::put($key,$progress,3600*24*7);
+
             $bar->advance();
             $bar->advance();
+            sleep(2);
 
 
             if($this->option('test')){
             if($this->option('test')){
                 $this->info("key:{$key}");
                 $this->info("key:{$key}");
@@ -130,6 +133,7 @@ class UpgradeChapterDynamicWeekly extends Command
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/ch_{$chapter->channel_id}";
             $key="/chapter_dynamic/{$chapter->book}/{$chapter->para}/ch_{$chapter->channel_id}";
             Cache::put($key,$progress,3600*24*7);
             Cache::put($key,$progress,3600*24*7);
             $bar->advance();
             $bar->advance();
+            sleep(2);
 
 
             if($this->option('test')){
             if($this->option('test')){
                 $this->info("key:{$key}");
                 $this->info("key:{$key}");