Files
OMS/app/ome/lib/autotask/timer/cleandata.php
2025-12-28 23:13:25 +08:00

39 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
/**
* 定期清理数据处理类
*
* @author kamisama.xia@gmail.com
* @version 0.1
*/
class ome_autotask_timer_cleandata
{
public function process($params, &$error_msg=''){
set_time_limit(0);
ignore_user_abort(1);
//每天检测日志表将超过7天的数据清除放到副表不实际删除
kernel::single('ome_sync_api_log')->clean();
//防并发表数据清理
kernel::single('ome_concurrent')->clean();
//[清除]复审日志任务计划
kernel::single('ome_retrial')->clean();
//清除过期的kv信息
base_kvstore::delete_expire_data();
//定期清理 退款未退货 半年前已完结的单据
kernel::single('ome_refund_noreturn')->clean();
// 定期清理 预警通知
kernel::single('monitor_event_notify')->clean('7');
return true;
}
}