diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/broadcast_message.rb | 11 | ||||
-rw-r--r-- | app/models/label.rb | 1 |
2 files changed, 0 insertions, 12 deletions
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb index 18fe2a9624f..0fd8dca70b4 100644 --- a/app/models/broadcast_message.rb +++ b/app/models/broadcast_message.rb @@ -17,13 +17,11 @@ class BroadcastMessage < ApplicationRecord default_value_for :font, '#FFFFFF' CACHE_KEY = 'broadcast_message_current_json'.freeze - LEGACY_CACHE_KEY = 'broadcast_message_current'.freeze after_commit :flush_redis_cache def self.current messages = cache.fetch(CACHE_KEY, as: BroadcastMessage, expires_in: cache_expires_in) do - remove_legacy_cache_key current_and_future_messages end @@ -50,14 +48,6 @@ class BroadcastMessage < ApplicationRecord nil end - # This can be removed in GitLab 12.0+ - # The old cache key had an indefinite lifetime, and in an HA - # environment a one-shot migration would not work because the cache - # would be repopulated by a node that has not been upgraded. - def self.remove_legacy_cache_key - cache.expire(LEGACY_CACHE_KEY) - end - def active? started? && !ended? end @@ -84,6 +74,5 @@ class BroadcastMessage < ApplicationRecord def flush_redis_cache self.class.cache.expire(CACHE_KEY) - self.class.remove_legacy_cache_key end end diff --git a/app/models/label.rb b/app/models/label.rb index e9085e8bd25..b83e0862bab 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -13,7 +13,6 @@ class Label < ApplicationRecord cache_markdown_field :description, pipeline: :single_line DEFAULT_COLOR = '#428BCA' - NONE = 'no label' default_value_for :color, DEFAULT_COLOR |