Remove unused code

This commit is contained in:
Artur Beljajev 2018-01-13 12:52:11 +02:00
parent 233bbd752e
commit a183eb400b
2 changed files with 0 additions and 11 deletions

1
.reek
View file

@ -246,7 +246,6 @@ DuplicateMethodCall:
- Billing::Price#self.effective - Billing::Price#self.effective
- Billing::Price#self.valid - Billing::Price#self.valid
- BusinessRegistryCache#fetch_by_ident_and_cc - BusinessRegistryCache#fetch_by_ident_and_cc
- BusinessRegistryCache#purge
- Certificate#parse_metadata - Certificate#parse_metadata
- Certificate#reload_apache - Certificate#reload_apache
- Certificate#revoke! - Certificate#revoke!

View file

@ -69,15 +69,5 @@ class BusinessRegistryCache < ActiveRecord::Base
def business_registry def business_registry
Soap::Arireg.new Soap::Arireg.new
end end
def purge
STDOUT << "#{Time.zone.now.utc} - Starting Purge of old BusinessRegistry data from cache\n" unless Rails.env.test?
purged = 0
BusinessRegistryCache.where('retrieved_on < ?',
Time.zone.now < Setting.days_to_keep_business_registry_cache.days).each do |br|
br.destroy and purged += 1
end
STDOUT << "#{Time.zone.now.utc} - Finished purging #{purged} old BusinessRegistry cache items\n" unless Rails.env.test?
end
end end
end end