1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Console\Commands;
- use App\DataApi\Helper\PackageHelper;
- use Illuminate\Support\Facades\Log;
- class syncPackageInfo extends \Illuminate\Console\Command
- {
- protected $signature = "saler_package_info:sync";
- protected $description = 'saler_package_info sync';
- public function __construct()
- {
- parent::__construct();
- }
- public function handle()
- {
- $PackageHelper = new PackageHelper();
- $PackageHelper->syncPackageInfo();
- Log::info('更新套餐标签信息成功,请等待下次更新');
- $i = 0;
- //10分钟同步一次
- while ($i < 600) {
- sleep(1);
- $i++;
- }
- $this->handle();
- }
- }
|