146
})
147
149
return "", nil, err
150
}
151
153
}
154
155
func (notifier *NotifierImpl) UnwatchHistoryEvent(
156
>
identifier definition.WorkflowKey, subscriberID string) error {
notifier.go
157
>
158
>
success := true
159
>
notifier.eventsPubsubs.RemoveIf(identifier, func(key any, value any) bool {
160
>
subscribers := value.(map[string]chan *Notification)
161
>
162
>
if _, ok := subscribers[subscriberID]; !ok {
163
// cannot find the subscribe ID, which means there is a bug
164
success = false
166
>
delete(subscribers, subscriberID)
167
>
}
168
170
})
171
173
// cannot find the subscribe ID, which means there is a bug
174
return serviceerror.NewInternal("Unable to unwatch on workflow execution.")
175
}
176
178
}
179