summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-06-06 14:00:17 +0000
committerNick Thomas <nick@gitlab.com>2019-06-06 14:00:17 +0000
commite5aba4b153d4ebaa8a6b0683f7ecae706e9c7e45 (patch)
tree046df7d2929558adae980f2c362253bf499d0f46 /lib
parent64c6987dfdcd5cb78b4a192a4632b227eabe801f (diff)
parent10dcfac1f17cffbbc542d47bdf27b682ab453dd2 (diff)
downloadgitlab-ce-e5aba4b153d4ebaa8a6b0683f7ecae706e9c7e45.tar.gz
Merge branch 'revert-a05f86ce' into 'master'
Revert "Merge branch 'pages-domain_ssl-valid-period' into 'master'" Closes #62861 See merge request gitlab-org/gitlab-ce!29273
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb b/lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb
deleted file mode 100644
index 6bc39034ada..00000000000
--- a/lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module BackgroundMigration
- # save validity time pages domain
- class FillValidTimeForPagesDomainCertificate
- # define PagesDomain with only needed code
- class PagesDomain < ActiveRecord::Base
- self.table_name = 'pages_domains'
-
- def x509
- return unless certificate.present?
-
- @x509 ||= OpenSSL::X509::Certificate.new(certificate)
- rescue OpenSSL::X509::CertificateError
- nil
- end
- end
-
- def perform(start_id, stop_id)
- PagesDomain.where(id: start_id..stop_id).find_each do |domain|
- domain.update_columns(
- certificate_valid_not_before: domain.x509&.not_before&.iso8601,
- certificate_valid_not_after: domain.x509&.not_after&.iso8601
- )
- rescue => e
- Rails.logger.error "Failed to update pages domain certificate valid time. id: #{domain.id}, message: #{e.message}"
- end
- end
- end
- end
-end