MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / delayedCancelKey

Function delayedCancelKey

server-source-code/internal/notifications/emitter.go:455–464  ·  view source on GitHub ↗

delayedCancelKey returns the Redis key that, if set, means this delayed notification should be suppressed.

(ev Event)

Source from the content-addressed store, hash-verified

453
454// delayedCancelKey returns the Redis key that, if set, means this delayed notification should be suppressed.
455func delayedCancelKey(ev Event) string {
456 refID := ev.ReferenceID
457 if refID == "" {
458 refID = metadataString(ev.Metadata, "host_id")
459 }
460 if refID == "" {
461 return ""
462 }
463 return fmt.Sprintf("notif:cancel:%s:%s", ev.Type, refID)
464}
465
466// IsDelayedCancelled checks if a delayed notification has been cancelled by a counterpart event.
467func IsDelayedCancelled(rdb *redis.Client, tenantHost, cancelKey string) bool {

Callers 1

emitMethod · 0.85

Calls 1

metadataStringFunction · 0.85

Tested by

no test coverage detected