Browse Source

add .stop

visuddhinanda 2 years ago
parent
commit
1d4f3b11de
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Console/Commands/ExportOffline.php

+ 5 - 1
app/Console/Commands/ExportOffline.php

@@ -10,7 +10,7 @@ class ExportOffline extends Command
 {
 {
     /**
     /**
      * The name and signature of the console command.
      * The name and signature of the console command.
-     *
+     * php artisan export:offline lzma
      * @var string
      * @var string
      */
      */
     protected $signature = 'export:offline {format?}';
     protected $signature = 'export:offline {format?}';
@@ -39,6 +39,9 @@ class ExportOffline extends Command
      */
      */
     public function handle()
     public function handle()
     {
     {
+        $exportStop = storage_path('app/public/export/offline/.stop');
+        $file = fopen($exportStop,'w');
+        fclose($file);
         //建表
         //建表
         $this->info('create db');
         $this->info('create db');
         $this->call('export:create.db');
         $this->call('export:create.db');
@@ -104,6 +107,7 @@ class ExportOffline extends Command
                    'min_app_ver'=>'1.3',
                    'min_app_ver'=>'1.3',
                     ];
                     ];
         Cache::put('/offline/index',$info);
         Cache::put('/offline/index',$info);
+        unlink($exportStop);
         return 0;
         return 0;
     }
     }
 }
 }