refactor: Update SendNotification function to handle old and new settings triggers

This commit is contained in:
Marvin Zhang
2024-07-15 17:34:04 +08:00
parent e672329370
commit b7cafb4623
9 changed files with 131 additions and 241 deletions

View File

@@ -1,14 +1,17 @@
package constants
const (
NotificationTriggerTargetTask = "task"
NotificationTriggerTargetNode = "node"
)
const (
NotificationTriggerTaskFinish = "task_finish"
NotificationTriggerTaskError = "task_error"
NotificationTriggerTaskEmptyResults = "task_empty_results"
NotificationTriggerTaskNever = "task_never"
NotificationTriggerNodeStatusChange = "node_status_change"
NotificationTriggerNodeOnline = "node_online"
NotificationTriggerNodeOffline = "node_offline"
NotificationTriggerNodeNever = "node_never"
)
const (