1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-28 13:21:37 +08:00
koogua 0336a54911 1.源文件增加版权信息
2.群组状态和课程协同
2021-06-13 15:49:47 +08:00

45 lines
1.0 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Services\Logic\Notice\DingTalk;
use App\Models\Task as TaskModel;
use App\Services\DingTalkNotice;
class ServerMonitor extends DingTalkNotice
{
public function handleTask(TaskModel $task)
{
if (!$this->enabled) return;
$notice = new DingTalkNotice();
$content = $task->item_info['content'];
$notice->atTechSupport($content);
}
public function createTask($content)
{
if (!$this->enabled) return;
$task = new TaskModel();
$itemInfo = ['content' => $content];
$task->item_id = time();
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_NOTICE_SERVER_MONITOR;
$task->priority = TaskModel::PRIORITY_HIGH;
$task->status = TaskModel::STATUS_PENDING;
$task->max_try_count = 1;
$task->create();
}
}