-
Notifications
You must be signed in to change notification settings - Fork 461
Notifications
Details about our notification sub-system.
This sub-system is based on the Event::Base, EventSubscription and Notification classes.
- An
Eventgets stored in the database -
clockworkperiodically schedules aSendEventEmailsJobevery 30 seconds. -
SendEventEmailsJobgoes over theEventtable and- sends e-mail for all
Eventthat have email subscribers - creates
Notificationfor allEventthat have web/rss subscribers
- sends e-mail for all
An Event describes things that happen throughout the whole OBS (backend+frontend). For instance:
- A comment is added to a package
- Someone sent a submit request for a package
A Subscription is specific for a User, a Group, a type of Event (eventtype=Event::CommentForPackage), a Role the User might have (receiver_role="maintainer") and the place where it should be displayed (channel=web, channel=instant_email)
See the Events page for deeper information about Event & Subscription.
A Notification is for a specific Event, a User (subscriber_id=1) and one or more places where it should be displayed (rss=true, web=false).
There are mainly three types of notifications in OBS (Email, Web, and RSS).
These events generate notifications for Web and RSS.
- Event::ReviewWanted
- Event::RequestCreate
- Event::RequestStatechange
- Event::CommentForProject
- Event::CommentForPackage
- Event::CommentForRequest
In addition to the events mentioned above, email notifications use two addtional events.
- Event::BuildFail
- Event::ServiceFail
All notifications are triggered with the help of SendEventEmailsJob. This job depends on:
-
NotificationService::Notifierfor Web and RSS feeds -
EventMailerfor emails
NotificationService::Notifier takes the event object and notify the subscribers for Web and RSS feeds.
OBS use mails_sent column in events table to keep track of the events that are notified, regardless of the channel (Web/RSS/Email). Once an event is notified mails_sent is set to true.
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Test in kanku
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- Package Versions
- next_rails
- Ruby Update
- Rails Profiling
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- Brakeman
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models
- RFC: Hotwire Turbo Frames Pattern