-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13874 from dmarcoux/instrument-request-action-seen
Instrument the "Request Action Seen" feature
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class BsRequestActionsSeenByUser < ApplicationRecord | ||
belongs_to :bs_request_action | ||
belongs_to :user | ||
|
||
after_create do |_record| | ||
RabbitmqBus.send_to_bus('metrics', 'bs_request_action,seen=true count=1') | ||
end | ||
|
||
after_destroy do |_record| | ||
RabbitmqBus.send_to_bus('metrics', 'bs_request_action,seen=false count=1') | ||
end | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: bs_request_actions_seen_by_users | ||
# | ||
# bs_request_action_id :bigint not null, indexed => [user_id] | ||
# user_id :bigint not null, indexed => [bs_request_action_id] | ||
# | ||
# Indexes | ||
# | ||
# bs_request_actions_seen_by_users_index (bs_request_action_id,user_id) | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters