mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
feat: 增加内置节点注册任务;优化定时器代码结构;
This commit is contained in:
22
extend/base/tools/controller/timer/SystemHostBase.php
Normal file
22
extend/base/tools/controller/timer/SystemHostBase.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace base\tools\controller\timer;
|
||||
|
||||
use app\common\controller\TimerController;
|
||||
use app\common\service\HostService;
|
||||
use think\facade\Db;
|
||||
use think\facade\Log;
|
||||
|
||||
class SystemHostBase extends TimerController
|
||||
{
|
||||
protected $frequency = 10;
|
||||
|
||||
public function do()
|
||||
{
|
||||
HostService::heartbeat();
|
||||
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user