-
Notifications
You must be signed in to change notification settings - Fork 461
Notifications
Details about our notification sub-system.
- An
Eventgets stored in the database -
clockworkperiodically schedules aSendEventEmailsJobevery 30 seconds. -
SendEventEmailsJobgoes over theEventtable and-
EventMailersends email aboutEventthat have a emailEventSubscription -
NotificationService::NotifiercreatesNotificationfor allEventthat have web/rssEventSubscription - Once done
Event.mails_sentis set totrueso the event subsystem knows we are done and can clean up after itself.
-
An Event describes things that happen throughout the whole OBS. See the Events docu for details.
People subscribe to an event by creating an instance of EventSubscription in the database.
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)
The code below will, for instance, create an email subscription for the user henne for all Event::BuildFail events, concerning packages henne is maintainer of.
EventSubscription.create(eventtype: "Event::BuildFail",
receiver_role: "maintainer",
user: User.find_by(login: 'henne'),
channel: "instant_email",
enabled: true)All EventSubscription instances that have neither the user nor the group attribute set are considered for all users and groups.
Those defaults can only be created by OBS admins via the UI. In a fresh OBS installation there are no instances of EventSubscription.
A Notification is for a specific Event, a specific User (subscriber_id=1) and one or more places where it should be displayed (rss=true, web=false).
- 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