Count RfCs with comments in PostgreSQL for faster Prometheus initialization
This commit is contained in:
@ -41,7 +41,7 @@ module Prometheus
|
|||||||
state: RequestForComment::SOLVED)
|
state: RequestForComment::SOLVED)
|
||||||
|
|
||||||
# count of rfcs with comments
|
# count of rfcs with comments
|
||||||
@rfc_commented_count.observe(RequestForComment.with_comments.count)
|
@rfc_commented_count.observe(RequestForComment.joins(:comments).distinct.count(:id))
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_notification(object)
|
def update_notification(object)
|
||||||
|
Reference in New Issue
Block a user