Apply automatic rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 10:51:44 +02:00
parent fe4000916c
commit 6cbecb5b39
440 changed files with 2705 additions and 1853 deletions

View File

@ -42,11 +42,11 @@ module Prometheus
def initialize_rfc_metrics
# Initialize rfc metric
@rfc_count.observe(RequestForComment.unsolved.where(full_score_reached: false).count,
state: RequestForComment::ONGOING)
state: RequestForComment::ONGOING)
@rfc_count.observe(RequestForComment.unsolved.where(full_score_reached: true).count,
state: RequestForComment::SOFT_SOLVED)
state: RequestForComment::SOFT_SOLVED)
@rfc_count.observe(RequestForComment.where(solved: true).count,
state: RequestForComment::SOLVED)
state: RequestForComment::SOLVED)
# count of rfcs with comments
@rfc_commented_count.observe(RequestForComment.joins(:comments).distinct.count(:id))
@ -56,8 +56,8 @@ module Prometheus
Rails.logger.debug("Prometheus metric updated for #{object.class.name}")
case object
when RequestForComment
update_rfc(object)
when RequestForComment
update_rfc(object)
end
end
@ -66,10 +66,10 @@ module Prometheus
Rails.logger.debug("Prometheus instance count increased for #{object.class.name}")
case object
when RequestForComment
create_rfc(object)
when Comment
create_comment(object)
when RequestForComment
create_rfc(object)
when Comment
create_comment(object)
end
end
@ -78,8 +78,8 @@ module Prometheus
Rails.logger.debug("Prometheus instance count decreased for #{object.class.name}")
case object
when Comment
destroy_comment(object)
when Comment
destroy_comment(object)
end
end