Quellcode durchsuchen

Merge pull request #2028 from visuddhinanda/laravel

tag tag.map 导出到索引
visuddhinanda vor 2 Jahren
Ursprung
Commit
8829a13dd4

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

@@ -81,8 +81,10 @@ class ExportOffline extends Command
         if(!$this->option('shortcut')){
         if(!$this->option('shortcut')){
             //tag
             //tag
             $this->info('export tag start');
             $this->info('export tag start');
-            $this->call('export:tag');
-            $this->call('export:tag.map');
+            $this->call('export:tag',['db'=>'wikipali-offline']);
+            $this->call('export:tag',['db'=>'wikipali-offline-index']);
+            $this->call('export:tag.map',['db'=>'wikipali-offline']);
+            $this->call('export:tag.map',['db'=>'wikipali-offline-index']);
             //
             //
             $this->info('export pali text start');
             $this->info('export pali text start');
             $this->call('export:pali.text');
             $this->call('export:pali.text');

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

@@ -14,7 +14,7 @@ class ExportTag extends Command
      *
      *
      * @var string
      * @var string
      */
      */
-    protected $signature = 'export:tag';
+    protected $signature = 'export:tag {db}';
 
 
     /**
     /**
      * The console command description.
      * The console command description.
@@ -44,7 +44,7 @@ class ExportTag extends Command
         if(\App\Tools\Tools::isStop()){
         if(\App\Tools\Tools::isStop()){
             return 0;
             return 0;
         }
         }
-        $exportFile = storage_path('app/public/export/offline/wikipali-offline-'.date("Y-m-d").'.db3');
+        $exportFile = storage_path('app/public/export/offline/'.$this->argument('db').'-'.date("Y-m-d").'.db3');
         $dbh = new \PDO('sqlite:'.$exportFile, "", "", array(\PDO::ATTR_PERSISTENT => true));
         $dbh = new \PDO('sqlite:'.$exportFile, "", "", array(\PDO::ATTR_PERSISTENT => true));
         $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
         $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
         $dbh->beginTransaction();
         $dbh->beginTransaction();

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

@@ -14,7 +14,7 @@ class ExportTagmap extends Command
      *
      *
      * @var string
      * @var string
      */
      */
-    protected $signature = 'export:tag.map';
+    protected $signature = 'export:tag.map {db}';
 
 
     /**
     /**
      * The console command description.
      * The console command description.
@@ -44,7 +44,7 @@ class ExportTagmap extends Command
         if(\App\Tools\Tools::isStop()){
         if(\App\Tools\Tools::isStop()){
             return 0;
             return 0;
         }
         }
-        $exportFile = storage_path('app/public/export/offline/wikipali-offline-'.date("Y-m-d").'.db3');
+        $exportFile = storage_path('app/public/export/offline/'.$this->argument('db').'-'.date("Y-m-d").'.db3');
         $dbh = new \PDO('sqlite:'.$exportFile, "", "", array(\PDO::ATTR_PERSISTENT => true));
         $dbh = new \PDO('sqlite:'.$exportFile, "", "", array(\PDO::ATTR_PERSISTENT => true));
         $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
         $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
         $dbh->beginTransaction();
         $dbh->beginTransaction();

+ 1 - 1
app/Console/Commands/MqProgress.php

@@ -10,7 +10,7 @@ class MqProgress extends Command
 {
 {
     /**
     /**
      * The name and signature of the console command.
      * The name and signature of the console command.
-     *
+     * php artisan mq:progress
      * @var string
      * @var string
      */
      */
     protected $signature = 'mq:progress';
     protected $signature = 'mq:progress';