mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-06 20:50:01 +00:00
1. 添加了多IP线路的兼容; 2. 强化用户信息变动 与 VNet信息更新的机制; 3. 修正了节点结构修正后,VNet重置线路异常的问题; 4. 添加VNet线路一键重启命令 `php artisan vnet:reload`。
29 lines
643 B
PHP
29 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Jobs\VNet\reloadNode;
|
|
use App\Models\Node;
|
|
use Illuminate\Console\Command;
|
|
use Log;
|
|
|
|
class VNetReload extends Command
|
|
{
|
|
protected $signature = 'vnet:reload';
|
|
protected $description = 'VNet线路重置';
|
|
|
|
public function handle()
|
|
{
|
|
$startTime = microtime(true);
|
|
|
|
$nodes = Node::whereStatus(1)->whereType(4)->get();
|
|
if ($nodes->isNotEmpty()) {
|
|
reloadNode::dispatchNow($nodes);
|
|
}
|
|
|
|
$jobTime = round((microtime(true) - $startTime), 4);
|
|
|
|
Log::info('---【'.$this->description.'】完成---,耗时'.$jobTime.'秒');
|
|
}
|
|
}
|