mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: Update notification trigger patterns and add alert trigger
The code changes modify the notification constants and models to update the trigger patterns for tasks and nodes. Additionally, a new trigger for alerts is added to the constants. This change allows for more flexible matching of notification triggers.
This commit is contained in:
@@ -168,8 +168,10 @@ func (svr TaskServerV2) SendNotification(_ context.Context, request *grpc.TaskSe
|
||||
|
||||
// settings
|
||||
settings, err := service.NewModelServiceV2[models2.NotificationSettingV2]().GetMany(bson.M{
|
||||
"enabled": true,
|
||||
"trigger_target": constants.NotificationTriggerTargetTask,
|
||||
"enabled": true,
|
||||
"trigger": bson.M{
|
||||
"$regex": constants.NotificationTriggerPatternTask,
|
||||
},
|
||||
}, nil)
|
||||
if err != nil {
|
||||
return nil, trace.TraceError(err)
|
||||
|
||||
Reference in New Issue
Block a user