diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-05 23:24:38 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-07 14:32:31 +0300 |
commit | 15ba85ab8e6c0f3dd18663233fd86bcb3bde4e73 (patch) | |
tree | 2b7f923813d9d9db1c9be6fe16a9f90f68205e9c /app/models | |
parent | bb4919103116aa6aa7cf851fc29a8841ffd78026 (diff) | |
download | gitlab-ce-15ba85ab8e6c0f3dd18663233fd86bcb3bde4e73.tar.gz |
Remove some deprecated codedz-cleanup-deprecated-code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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 |