Skip to content

Commit

Permalink
feat: playbook table sync
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
adityathebe committed Nov 5, 2024
1 parent 4cd2617 commit 27f3635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import (
"go.opentelemetry.io/otel"

"github.com/flanksource/duty/context"
"github.com/flanksource/duty/models"
"github.com/flanksource/duty/postq/pg"
"github.com/flanksource/duty/query"
"github.com/flanksource/duty/shutdown"
"github.com/flanksource/kopper"

Expand Down Expand Up @@ -134,13 +136,17 @@ func tableUpdatesHandler(ctx context.Context) {

notificationUpdateCh := notifyRouter.GetOrCreateChannel("notifications")
teamsUpdateChan := notifyRouter.GetOrCreateChannel("teams")
playbooksUpdateChan := notifyRouter.GetOrCreateChannel("playbooks")
permissionUpdateChan := notifyRouter.GetOrCreateChannel("permissions")

for {
select {
case id := <-notificationUpdateCh:
notification.PurgeCache(id)

case id := <-playbooksUpdateChan:
query.GetterCacheDeleteByID[models.Playbook](id)

case id := <-teamsUpdateChan:
responder.PurgeCache(id)
teams.PurgeCache(id)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ require (
sigs.k8s.io/yaml v1.4.0
)

// replace github.com/flanksource/duty => ../duty
replace github.com/flanksource/duty => ../duty

// replace github.com/flanksource/gomplate/v3 => ../gomplate

Expand Down

0 comments on commit 27f3635

Please sign in to comment.