Files
yuyin-php/application/common/command/FenZhang.php
2025-08-08 14:45:40 +08:00

49 lines
1.3 KiB
PHP

<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use app\admin\model\ReloadDb;
class FenZhang extends Command
{
protected function configure()
{
$this->setName('fen-zhang')
->setDescription('分账监控'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// set_time_limit(0);
ini_set ('memory_limit', '128M');
while (true) {
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, "http://qicekj.cn/admin/cli/tian_logic_queue");
// curl_setopt($ch, CURLOPT_HEADER, 0);
// // 设置 curl 最长等待时间
// curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
// // 最长执行时间1800分钟
// curl_setopt($ch, CURLOPT_TIMEOUT, 1800);
// curl_exec($ch);
// echo '分账监控!';
// sleep(3);
ReloadDb::init();
model('admin/Capital')->tian_logic_queue();
echo '分账监控!'.date('Y-m-d H:i:s').PHP_EOL;;
sleep(3);
}
}
}