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

Beds 3208/dashboard notifications add group subs #882

Merged
merged 44 commits into from
Oct 11, 2024

Conversation

peterbitfly
Copy link
Contributor

Implements backend handling for dashboard based notifications. Preserves handling of legacy webhook notifications to provide backward compatibility.

Copy link

cloudflare-workers-and-pages bot commented Oct 1, 2024

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7de9ba1
Status: ✅  Deploy successful!
Preview URL: https://f8b7e049.beaconchain.pages.dev
Branch Preview URL: https://beds-3208-dashboard-notifica.beaconchain.pages.dev

View logs

@peterbitfly peterbitfly marked this pull request as ready for review October 10, 2024 06:12
Copy link
Contributor

@remoterami remoterami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ptal at my suggestions/comments

backend/pkg/notification/types.go Outdated Show resolved Hide resolved
backend/pkg/commons/db/subscriptions.go Outdated Show resolved Hide resolved
backend/pkg/commons/types/frontend.go Show resolved Hide resolved
backend/pkg/commons/utils/db.go Outdated Show resolved Hide resolved
backend/pkg/notification/db.go Outdated Show resolved Hide resolved
}

log.Infof("lock obtained")
err = dispatchNotifications()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could pass ctx down and apply it to all the db queries to handle timeouts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that won't work as those tx touch a different db. the timeout is here so that the lock eventually gets released. but as the sender has become network specific I believe the lock is also no longer needed or should be applied on network db level in the future.

backend/pkg/notification/types.go Outdated Show resolved Hide resolved
backend/pkg/notification/types.go Show resolved Hide resolved
Copy link
Contributor

@remoterami remoterami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@peterbitfly peterbitfly merged commit 96a8265 into staging Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants