Skip to content
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

chore: bump duty to v1.0.651 #1391

Merged
merged 2 commits into from
Sep 13, 2024
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
4 changes: 2 additions & 2 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func tableUpdatesHandler(ctx context.Context) {
notifyRouter := pg.NewNotifyRouter()
go notifyRouter.Run(ctx, "table_activity")

notificationUpdateCh := notifyRouter.RegisterRoutes("notifications")
teamsUpdateChan := notifyRouter.RegisterRoutes("teams")
notificationUpdateCh := notifyRouter.GetOrCreateChannel("notifications")
teamsUpdateChan := notifyRouter.GetOrCreateChannel("teams")

for {
select {
Expand Down
4 changes: 2 additions & 2 deletions events/event_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func StartConsumers(ctx context.Context) {
if ec, err := consumer.EventConsumer(); err != nil {
log.Fatalf("failed to create event consumer: %s", err)
} else {
pgsyncNotifyChannel := notifyRouter.RegisterRoutes(event)
pgsyncNotifyChannel := notifyRouter.GetOrCreateChannel(event)
consumers = append(consumers, ec)
go ec.Listen(ctx, pgsyncNotifyChannel)
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func StartConsumers(ctx context.Context) {
if ec, err := consumer.EventConsumer(); err != nil {
log.Fatalf("failed to create event consumer: %s", err)
} else {
pgasyncNotifyChannel := notifyRouter.RegisterRoutes(event)
pgasyncNotifyChannel := notifyRouter.GetOrCreateChannel(event)
consumers = append(consumers, ec)
go ec.Listen(ctx, pgasyncNotifyChannel)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/containrrr/shoutrrr v0.8.0
github.com/fergusstrange/embedded-postgres v1.25.0 // indirect
github.com/flanksource/commons v1.29.10
github.com/flanksource/duty v1.0.647
github.com/flanksource/duty v1.0.651
github.com/flanksource/gomplate/v3 v3.24.30
github.com/flanksource/kopper v1.0.10
github.com/gomarkdown/markdown v0.0.0-20240419095408-642f0ee99ae2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ github.com/flanksource/artifacts v1.0.14 h1:Vv70bccsae0MwGaf/uSPp34J5V1/PyKfct9z
github.com/flanksource/artifacts v1.0.14/go.mod h1:qHVCnQu5k50aWNJ5UhpcAKEl7pAzqUrFFKGSm147G70=
github.com/flanksource/commons v1.29.10 h1:T/S95Pl8kASEFvQjQ7fJjTUqeVdhxQXg1vfkULTYFJQ=
github.com/flanksource/commons v1.29.10/go.mod h1:iTbrXOSp3Spv570Nly97D/U9cQjLZoVlmWCXqWzsvRU=
github.com/flanksource/duty v1.0.647 h1:fc2x8TjmYTOztMVZd0H9TmU7XqRkpVT1ynkvU7atTNo=
github.com/flanksource/duty v1.0.647/go.mod h1:Oj9zIX94CR2U+nmnt97gNLMrsBWILyIhIBeJynIIgqE=
github.com/flanksource/duty v1.0.651 h1:mlu9t22u7og1krEDuVhDjjLv5WMmf01s25Ycnk9C7/k=
github.com/flanksource/duty v1.0.651/go.mod h1:Oj9zIX94CR2U+nmnt97gNLMrsBWILyIhIBeJynIIgqE=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.24.30 h1:6Y25KnAMX4iCuEXe1C8d1kB2PdV+zD1ZulZrv6DV14Q=
github.com/flanksource/gomplate/v3 v3.24.30/go.mod h1:/lAM7+fkcCCfghCAjzdCqwgWxN5Ow8Sk6nkdFPjejCE=
Expand Down
2 changes: 2 additions & 0 deletions notification/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var _ = ginkgo.Describe("Notifications", ginkgo.Ordered, func() {
ginkgo.It("should create a new notification", func() {
notif := models.Notification{
ID: uuid.New(),
Name: "test-notif-1",
Events: pq.StringArray([]string{"incident.created"}),
Template: "Severity: {{.incident.severity}}",
TeamID: &team.ID,
Expand Down Expand Up @@ -143,6 +144,7 @@ var _ = ginkgo.Describe("Notifications", ginkgo.Ordered, func() {

n = models.Notification{
ID: uuid.New(),
Name: "test-notif-2",
Events: pq.StringArray([]string{"config.updated"}),
Source: models.SourceCRD,
Title: "Dummy",
Expand Down
Loading