mirror of
https://github.com/ledccn/IYUUPlus.git
synced 2024-09-20 15:15:29 +00:00
fix
This commit is contained in:
parent
f093b54596
commit
7823ce3f36
|
@ -7,7 +7,6 @@ use app\common\exception\BusinessException;
|
|||
use app\common\Config as Conf;
|
||||
use app\common\Constant;
|
||||
use app\domain\Config;
|
||||
use app\domain\Crontab;
|
||||
/**
|
||||
* Class Status
|
||||
* @package app\controller
|
||||
|
@ -40,7 +39,7 @@ class Status extends BaseController
|
|||
public function welcome(Request $request): Response
|
||||
{
|
||||
$rs = self::RS;
|
||||
$cron = Crontab::crontabConfig();
|
||||
$cron = Config::getCrontab();
|
||||
$user_sites = Config::getUserSites();
|
||||
$sites = Config::getSites();
|
||||
$clients = Config::getClients();
|
||||
|
|
|
@ -180,6 +180,15 @@ class Config
|
|||
return Conf::get(self::filename['clients'], Constant::config_format, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务
|
||||
* @return array
|
||||
*/
|
||||
public static function getCrontab():array
|
||||
{
|
||||
return Conf::get(self::filename['crontab'], Constant::config_format, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 目录
|
||||
* @return array
|
||||
|
|
|
@ -74,7 +74,7 @@ class Crontab
|
|||
});
|
||||
|
||||
// 初始化计划任务文件[不同平台的配置,会造成command错误,需要重新解析命令]
|
||||
$cron = self::crontabConfig();
|
||||
$cron = Config::getCrontab();
|
||||
array_walk($cron, function ($v, $k){
|
||||
self::createHock($v);
|
||||
});
|
||||
|
@ -297,15 +297,6 @@ class Crontab
|
|||
return is_bool($ret) ? $ret : ($ret >= 10 ? true : false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户Cron配置
|
||||
* @return array
|
||||
*/
|
||||
public static function crontabConfig():array
|
||||
{
|
||||
return Conf::get(Config::filename['crontab'], Constant::config_format, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步执行命令
|
||||
* @descr 原理为php的程序执行函数后台执行
|
||||
|
|
Loading…
Reference in New Issue
Block a user