|
|
@@ -5,18 +5,16 @@ use Illuminate\Console\Command;
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
use App\Models\WordIndex;
|
|
|
use App\Models\WbwTemplate;
|
|
|
-use App\Models\UserDict;
|
|
|
use App\Tools\TurboSplit;
|
|
|
use App\Http\Api\DictApi;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
-use Illuminate\Support\Facades\Log;
|
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
|
|
class UpgradeCompound extends Command
|
|
|
{
|
|
|
/**
|
|
|
* The name and signature of the console command.
|
|
|
- * php -d memory_limit=1024M artisan upgrade:compound --api=https://staging.wikipali.org/api --from=20481 --to=30000
|
|
|
+ * php -d memory_limit=1024M artisan upgrade:compound --api=https://next.wikipali.org/api --from=182852 --to=30000
|
|
|
* @var string
|
|
|
*/
|
|
|
protected $signature = 'upgrade:compound {word?} {--book=} {--debug} {--test} {--continue} {--api=} {--from=} {--to=}';
|
|
|
@@ -48,12 +46,11 @@ class UpgradeCompound extends Command
|
|
|
public function handle()
|
|
|
{
|
|
|
if(\App\Tools\Tools::isStop()){
|
|
|
- return 0;
|
|
|
- }
|
|
|
- if(file_exists(base_path('.stop'))){
|
|
|
$this->info('.stop exists');
|
|
|
return 0;
|
|
|
}
|
|
|
+ $this->info('['.date('Y-m-d H:i:s', time()).'] upgrade:compound start');
|
|
|
+
|
|
|
$dict_id = DictApi::getSysDict('robot_compound');
|
|
|
if(!$dict_id){
|
|
|
$this->error('没有找到 robot_compound 字典');
|
|
|
@@ -197,6 +194,9 @@ class UpgradeCompound extends Command
|
|
|
}
|
|
|
}
|
|
|
$this->upload($wordIndex,$result,$this->option('api'));
|
|
|
+
|
|
|
+ $this->info('['.date('Y-m-d H:i:s', time()).'] upgrade:compound finished');
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|