Skip to content

Added EventCondition to EventTrigger #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions core/taskengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,11 +1149,21 @@ func (n *Engine) sendBatchedNotifications() {
resp := avsproto.SyncMessagesResp{
Id: notification.TaskID,
Op: notification.Operation,
TaskMetadata: &avsproto.SyncMessagesResp_TaskMetadata{
TaskId: notification.TaskID,
},
}

// Only include TaskMetadata for MonitorTaskTrigger operations
// For other operations (CancelTask, DeleteTask), TaskMetadata is not needed
// and sending incomplete TaskMetadata causes nil pointer issues in operators
if notification.Operation == avsproto.MessageOp_MonitorTaskTrigger {
// For MonitorTaskTrigger, we would need complete task data
// But batched notifications are typically for Cancel/Delete operations
// If we ever need to batch MonitorTaskTrigger, we should fetch full task data
n.logger.Warn("MonitorTaskTrigger should not be sent via batched notifications",
"task_id", notification.TaskID,
"operation", notification.Operation.String())
}
// Note: TaskMetadata is intentionally nil for Cancel/Delete operations

// Use timeout for each individual notification
done := make(chan error, 1)
go func() {
Expand Down
Loading