Przeglądaj źródła

Merge pull request #1863 from visuddhinanda/laravel

🔥 redis 有效期
visuddhinanda 2 lat temu
rodzic
commit
c484595329

+ 7 - 7
app/Console/Commands/ExportOffline.php

@@ -62,26 +62,26 @@ class ExportOffline extends Command
         $this->call('export:create.db');
         $this->call('export:create.db');
 
 
         //term
         //term
-        $this->info('export term');
+        $this->info('export term start');
         $this->call('export:term');
         $this->call('export:term');
 
 
         //导出channel
         //导出channel
-        $this->info('export channel');
+        $this->info('export channel start');
         $this->call('export:channel');
         $this->call('export:channel');
 
 
         if(!$this->option('shortcut')){
         if(!$this->option('shortcut')){
             //tag
             //tag
-            $this->info('tag');
+            $this->info('export tag start');
             $this->call('export:tag');
             $this->call('export:tag');
             $this->call('export:tag.map');
             $this->call('export:tag.map');
             //
             //
-            $this->info('pali text');
+            $this->info('export pali text start');
             $this->call('export:pali.text');
             $this->call('export:pali.text');
             //导出章节索引
             //导出章节索引
-            $this->info('chapter');
+            $this->info('export chapter start');
             $this->call('export:chapter.index');
             $this->call('export:chapter.index');
             //导出译文
             //导出译文
-            $this->info('sentence');
+            $this->info('export sentence start');
             $this->call('export:sentence',['--type'=>'translation']);
             $this->call('export:sentence',['--type'=>'translation']);
             $this->call('export:sentence',['--type'=>'nissaya']);
             $this->call('export:sentence',['--type'=>'nissaya']);
             //导出原文
             //导出原文
@@ -89,7 +89,7 @@ class ExportOffline extends Command
         }
         }
 
 
         $this->info('zip');
         $this->info('zip');
-        Log::debug('export offline: db写入完毕');
+        Log::info('export offline: db写入完毕 开始压缩');
 
 
         sleep(5);
         sleep(5);
         $this->call('export:zip',['format'=>$this->argument('format')]);
         $this->call('export:zip',['format'=>$this->argument('format')]);

+ 2 - 2
app/Console/Commands/UpgradeDictDefaultMeaning.php

@@ -111,7 +111,7 @@ class UpgradeDictDefaultMeaning extends Command
                                 ->select('word','note')
                                 ->select('word','note')
                                 ->cursor() as $word) {
                                 ->cursor() as $word) {
                 if(!empty($word['note'])){
                 if(!empty($word['note'])){
-                    RedisClusters::put("dict_first_mean/{$thisLang}/{$word['word']}", mb_substr($word['note'],0,50,"UTF-8") ,30*24*3600);
+                    RedisClusters::put("dict_first_mean/{$thisLang}/{$word['word']}", mb_substr($word['note'],0,50,"UTF-8"));
                 }
                 }
                 $bar->advance();
                 $bar->advance();
             }
             }
@@ -130,7 +130,7 @@ class UpgradeDictDefaultMeaning extends Command
                             if(!empty($_word) && $word['word'] === $_word ){
                             if(!empty($_word) && $word['word'] === $_word ){
                                 Log::info($cacheKey.':'.$cacheValue);
                                 Log::info($cacheKey.':'.$cacheValue);
                             }
                             }
-                            RedisClusters::put($cacheKey, $cacheValue ,30*24*3600);
+                            RedisClusters::put($cacheKey, $cacheValue);
                         }
                         }
 
 
                         if($count % 1000 === 0){
                         if($count % 1000 === 0){