package processor

import (
	"be.ems/src/framework/cron"
	"be.ems/src/modules/crontask/processor/backupEtcFromNE"
	processorBackupExportCDR "be.ems/src/modules/crontask/processor/backup_export_cdr"
	processorBackupExportLog "be.ems/src/modules/crontask/processor/backup_export_log"
	processorBackupExportUDM "be.ems/src/modules/crontask/processor/backup_export_udm"
	processorBackupRemoveFile "be.ems/src/modules/crontask/processor/backup_remove_file"
	"be.ems/src/modules/crontask/processor/delExpiredNeBackup"
	"be.ems/src/modules/crontask/processor/deleteExpiredRecord"
	processorDeleteNeConfigBackup "be.ems/src/modules/crontask/processor/delete_ne_config_backup"
	"be.ems/src/modules/crontask/processor/exportTable"
	"be.ems/src/modules/crontask/processor/exportUEData"
	"be.ems/src/modules/crontask/processor/genNeStateAlarm"
	"be.ems/src/modules/crontask/processor/getStateFromNE"
	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"
	"be.ems/src/modules/crontask/processor/removeFile"
)

// 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("delete_ne_config_backup", processorDeleteNeConfigBackup.NewProcessor)

	// delete expired NE backup file
	cron.CreateQueue("delExpiredNeBackup", delExpiredNeBackup.NewProcessor)
	cron.CreateQueue("deleteExpiredRecord", deleteExpiredRecord.NewProcessor)
	cron.CreateQueue("backupEtcFromNE", backupEtcFromNE.NewProcessor)
	cron.CreateQueue("getStateFromNE", getStateFromNE.NewProcessor)
	cron.CreateQueue("genNeStateAlarm", genNeStateAlarm.NewProcessor)
	cron.CreateQueue("exportTable", exportTable.NewProcessor)
	cron.CreateQueue("removeFile", removeFile.NewProcessor)
	cron.CreateQueue("exportUEData", exportUEData.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("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)
}
