visuddhinanda hace 2 años
padre
commit
c6f5663cdb
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      app/Console/Commands/ExportChapterIndex.php

+ 4 - 2
app/Console/Commands/ExportChapterIndex.php

@@ -5,6 +5,7 @@ namespace App\Console\Commands;
 use Illuminate\Console\Command;
 use Illuminate\Support\Facades\Storage;
 use App\Models\ProgressChapter;
+use Illuminate\Support\Facades\Cache;
 
 class ExportChapterIndex extends Command
 {
@@ -55,8 +56,9 @@ class ExportChapterIndex extends Command
         }
 
         $publicChannels = Channel::where('status',30)->select('uid')->get();
-
-        $bar = $this->output->createProgressBar(ProgressChapter::whereIn('channel_id',$publicChannels)->count());
+        $rows = ProgressChapter::whereIn('channel_id',$publicChannels)->count();
+        Cache::put("/export/chapter/count",$rows,3600*10);
+        $bar = $this->output->createProgressBar($rows);
         foreach (ProgressChapter::whereIn('channel_id',$publicChannels)
                                 ->select(['uid','book','para',
                                 'lang','title','channel_id',