Skip to content

Commit

Permalink
add a bunch of logs so i can stop running pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: rumstead <[email protected]>
  • Loading branch information
rumstead committed Jan 27, 2025
1 parent c64910d commit 5213a54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/application/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@ func (b *broadcasterHandler) Subscribe(ch chan *appv1.ApplicationWatchEvent, fil

func (b *broadcasterHandler) OnAdd(obj any, _ bool) {
if app, ok := obj.(*appv1.Application); ok {
log.Infof("app OnAdd %+v", app)
b.notify(&appv1.ApplicationWatchEvent{Application: *app.DeepCopy(), Type: watch.Added})
}
}

func (b *broadcasterHandler) OnUpdate(_, newObj any) {
if app, ok := newObj.(*appv1.Application); ok {
log.Infof("app OnUpdate %+v", app)
b.notify(&appv1.ApplicationWatchEvent{Application: *app.DeepCopy(), Type: watch.Modified})
}
}

func (b *broadcasterHandler) OnDelete(obj any) {
if app, ok := obj.(*appv1.Application); ok {
log.Infof("app OnDelete %+v", app)
b.notify(&appv1.ApplicationWatchEvent{Application: *app.DeepCopy(), Type: watch.Deleted})
}
}

0 comments on commit 5213a54

Please sign in to comment.