summaryrefslogtreecommitdiff
path: root/app/models/pages_domain.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r--app/models/pages_domain.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index 0c5a155d48a..c21027455b1 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -46,9 +46,6 @@ class PagesDomain < ApplicationRecord
algorithm: 'aes-256-cbc'
after_initialize :set_verification_code
- after_create :update_daemon
- after_update :update_daemon, if: :saved_change_to_pages_config?
- after_destroy :update_daemon
scope :for_project, ->(project) { where(project: project) }
@@ -233,32 +230,6 @@ class PagesDomain < ApplicationRecord
self.verification_code = SecureRandom.hex(16)
end
- # rubocop: disable CodeReuse/ServiceClass
- def update_daemon
- return if usage_serverless?
- return unless pages_deployed?
-
- run_after_commit { PagesUpdateConfigurationWorker.perform_async(project_id) }
- end
- # rubocop: enable CodeReuse/ServiceClass
-
- def saved_change_to_pages_config?
- saved_change_to_project_id? ||
- saved_change_to_domain? ||
- saved_change_to_certificate? ||
- saved_change_to_key? ||
- became_enabled? ||
- became_disabled?
- end
-
- def became_enabled?
- enabled_until.present? && !enabled_until_before_last_save.present?
- end
-
- def became_disabled?
- !enabled_until.present? && enabled_until_before_last_save.present?
- end
-
def validate_matching_key
unless has_matching_key?
self.errors.add(:key, "doesn't match the certificate")