Files
pull-courseware/app/command/test.php
T
julecn 9bab04be20 chore: 批量修改文件权限为可执行
将项目内绝大多数文件的权限从644调整为755,统一可执行权限配置
2026-08-02 16:29:01 +08:00

43 lines
990 B
PHP
Executable File

<?php
declare (strict_types = 1);
namespace app\command;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use Curl\Curl;
use Aria2;
class test extends Command
{
protected function configure()
{
// 指令配置
$this->setName('test')
->setDescription('the test command');
}
protected function execute(Input $input, Output $output)
{
$aria2 = new Aria2('http://127.0.0.1:16800/jsonrpc');
try {
// 获取所有活动的下载任务
$activeDownloads = $aria2->getGlobalStat();
dump('正在下载的任务数量:',intval($activeDownloads['result']['numWaiting']));
// dump('等待下载的任务数量:',$waitingCount);
} catch (Exception $e) {
dump($e);
}
// 指令输出
// $output->writeln('test');
}
}