package processor

import (
	"be.ems/src/framework/cron"
	processorBackupExportCDR "be.ems/src/modules/crontask/processor/backup_export_cdr"
	processorBackupExportKPI "be.ems/src/modules/crontask/processor/backup_export_kpi"
	processorBackupExportLog "be.ems/src/modules/crontask/processor/backup_export_log"
	processorBackupExportTable "be.ems/src/modules/crontask/processor/backup_export_table"
	processorBackupExportUDM "be.ems/src/modules/crontask/processor/backup_export_udm"
	processorBackupRemoveFile "be.ems/src/modules/crontask/processor/backup_remove_file"
	processorDeleteAlarmRecord "be.ems/src/modules/crontask/processor/delete_alarm_record"
	processorDeleteCDRRecord "be.ems/src/modules/crontask/processor/delete_cdr_record"
	processorDeleteDataRecord "be.ems/src/modules/crontask/processor/delete_data_record"
	processorDeleteKPIRecord "be.ems/src/modules/crontask/processor/delete_kpi_record"
	processorDeleteNeConfigBackup "be.ems/src/modules/crontask/processor/delete_ne_config_backup"
	processorDeleteUENBRecord "be.ems/src/modules/crontask/processor/delete_uenb_record"
	processorMonitorSysResource "be.ems/src/modules/crontask/processor/monitor_sys_resource"
	processorNeAlarmStateCheck "be.ems/src/modules/crontask/processor/ne_alarm_state_check"
	processorNeAlarmStateCheckCMD "be.ems/src/modules/crontask/processor/ne_alarm_state_check_cmd"
	processorNeAlarmStateCheckLicense "be.ems/src/modules/crontask/processor/ne_alarm_state_check_license"
	processorNeConfigBackup "be.ems/src/modules/crontask/processor/ne_config_backup"
	processorNeDataUDM "be.ems/src/modules/crontask/processor/ne_data_udm"
)

// InitCronQueue 初始定时任务队列
func InitCronQueue() {
	// 监控-系统资源
	cron.CreateQueue("monitor_sys_resource", processorMonitorSysResource.NewProcessor)
	// 网元-网元配置文件定期备份
	cron.CreateQueue("ne_config_backup", processorNeConfigBackup.NewProcessor)
	// 网元数据-UDM用户数据同步
	cron.CreateQueue("ne_data_udm", processorNeDataUDM.NewProcessor)

	// 网元告警-状态检查
	cron.CreateQueue("ne_alarm_state_check", processorNeAlarmStateCheck.NewProcessor)
	// 网元告警-内存/CPU/磁盘检查
	cron.CreateQueue("ne_alarm_state_check_cmd", processorNeAlarmStateCheckCMD.NewProcessor)
	// 网元告警-License到期检查
	cron.CreateQueue("ne_alarm_state_check_license", processorNeAlarmStateCheckLicense.NewProcessor)

	// 删除-表内数据记录
	cron.CreateQueue("delete_data_record", processorDeleteDataRecord.NewProcessor)
	// 删除-告警数据记录
	cron.CreateQueue("delete_alarm_record", processorDeleteAlarmRecord.NewProcessor)
	// 删除-KPI数据记录
	cron.CreateQueue("delete_kpi_record", processorDeleteKPIRecord.NewProcessor)
	// 删除-KPI数据记录
	cron.CreateQueue("delete_cdr_record", processorDeleteCDRRecord.NewProcessor)
	// 删除-UENB数据记录
	cron.CreateQueue("delete_uenb_record", processorDeleteUENBRecord.NewProcessor)
	// 删除-网元配置文件定期备份
	cron.CreateQueue("delete_ne_config_backup", processorDeleteNeConfigBackup.NewProcessor)

	// 备份-导出数据表
	cron.CreateQueue("backup_export_table", processorBackupExportTable.NewProcessor)
	// 备份-删除备份目录下文件
	cron.CreateQueue("backup_remove_file", processorBackupRemoveFile.NewProcessor)
	// 备份-导出UDM用户数据
	cron.CreateQueue("backup_export_udm", processorBackupExportUDM.NewProcessor)
	// 备份-导出CDR数据
	cron.CreateQueue("backup_export_cdr", processorBackupExportCDR.NewProcessor)
	// 备份-导出Log数据
	cron.CreateQueue("backup_export_log", processorBackupExportLog.NewProcessor)
	// 备份-导出KPI数据
	cron.CreateQueue("backup_export_kpi", processorBackupExportKPI.NewProcessor)
}
