mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
完成内置的数据库日志驱动;内置数据库日志的定时清除;更新新的数据库sql;
This commit is contained in:
@@ -5,6 +5,8 @@ declare(strict_types=1);
|
||||
namespace app\common\command;
|
||||
|
||||
use app\common\tools\PathTools;
|
||||
use PDO;
|
||||
use think\Config as ThinkConfig;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\input\Option;
|
||||
@@ -34,6 +36,8 @@ class Install extends Command
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
|
||||
|
||||
// 指令输出
|
||||
|
||||
$force = $input->getOption('force');
|
||||
@@ -76,6 +80,12 @@ class Install extends Command
|
||||
Db::startTrans();
|
||||
try {
|
||||
foreach ($sqlArray as $vo) {
|
||||
if (strpos($vo, 'LOCK TABLES') === 0) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($vo, 'UNLOCK') === 0) {
|
||||
continue;
|
||||
}
|
||||
Db::execute($vo);
|
||||
}
|
||||
Db::name('system_admin')
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
|
||||
return [
|
||||
[
|
||||
'name'=>'http_demo', // 定时任务的名称,不能重複
|
||||
'type'=>'site', // 定时任务的类型,默认只支持site,你也可以重写定时器命令行以支持其他命令
|
||||
'target'=>'/tools/timer.ResetPassword/do', // 要访问的地址,如果不是以https开头,那么以后台的系统配置中读取相关配置,如果没有配置则不执行
|
||||
'frequency'=>600 // 执行频率,单位:秒,填写10,则每10秒过后执行一次
|
||||
]
|
||||
];
|
||||
'name' => 'http_demo', // 定时任务的名称,不能重复
|
||||
'type' => 'site', // 定时任务的类型,默认只支持site,你也可以重写定时器命令行以支持其他命令
|
||||
'target' => '/tools/timer.ResetPassword/do', // 要访问的地址,如果不是以https开头,那么以后台的系统配置中读取相关配置,如果没有配置则不执行
|
||||
'frequency' => 600 // 执行频率,单位:秒,填写10,则每10秒过后执行一次
|
||||
],
|
||||
[
|
||||
'name' => 'clear_log', // 定时任务的名称,不能重复
|
||||
'type' => 'site', // 定时任务的类型,默认只支持site,你也可以重写定时器命令行以支持其他命令
|
||||
'target' => '/tools/timer.ClearLog/do', // 要访问的地址,如果不是以https开头,那么以后台的系统配置中读取相关配置,如果没有配置则不执行
|
||||
'frequency' => 600 // 执行频率,单位:秒,填写10,则每10秒过后执行一次
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user