From 7d4cac38a8fb5d99ab3c660873a801cf3abe7585 Mon Sep 17 00:00:00 2001 From: Nikhil Pathak Date: Sat, 19 Oct 2019 10:59:56 +0530 Subject: [PATCH] Freeze Constant (#156) --- lib/constants/redis_keys.rb | 2 +- lib/constants/report.rb | 25 +++++++++++-------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/constants/redis_keys.rb b/lib/constants/redis_keys.rb index 8fee76ce2..7138e4f24 100644 --- a/lib/constants/redis_keys.rb +++ b/lib/constants/redis_keys.rb @@ -1,3 +1,3 @@ module Constants::RedisKeys - ROUND_ROBIN_AGENTS = "ROUND_ROBIN_AGENTS:%{inbox_id}" + ROUND_ROBIN_AGENTS = 'ROUND_ROBIN_AGENTS:%{inbox_id}'.freeze end diff --git a/lib/constants/report.rb b/lib/constants/report.rb index 34d0d3b40..43276d1a3 100644 --- a/lib/constants/report.rb +++ b/lib/constants/report.rb @@ -1,21 +1,18 @@ # frozen_string_literal: true module Constants::Report - ACCOUNT_METRICS = [ :conversations_count, - :incoming_messages_count, - :outgoing_messages_count, - :avg_first_response_time, - :avg_resolution_time, - :resolutions_count - ] + ACCOUNT_METRICS = [:conversations_count, + :incoming_messages_count, + :outgoing_messages_count, + :avg_first_response_time, + :avg_resolution_time, + :resolutions_count].freeze - AVG_ACCOUNT_METRICS = [:avg_first_response_time, :avg_resolution_time] + AVG_ACCOUNT_METRICS = [:avg_first_response_time, :avg_resolution_time].freeze + AGENT_METRICS = [:avg_first_response_time, + :avg_resolution_time, + :resolutions_count].freeze - AGENT_METRICS = [ :avg_first_response_time, - :avg_resolution_time, - :resolutions_count - ] - - AVG_AGENT_METRICS = [:avg_first_response_time, :avg_resolution_time] + AVG_AGENT_METRICS = [:avg_first_response_time, :avg_resolution_time].freeze end