2018-11-15 20:19:58 -05:00
|
|
|
module Jobs
|
|
|
|
class CleanUpDeprecatedUrlSiteSettings < Jobs::Scheduled
|
|
|
|
every 1.day
|
|
|
|
|
|
|
|
def execute(args)
|
|
|
|
Jobs::MigrateUrlSiteSettings::SETTINGS.each do |old_setting, new_setting|
|
|
|
|
if SiteSetting.where("name = ? AND value IS NOT NULL", new_setting).exists?
|
|
|
|
SiteSetting.public_send("#{old_setting}=", nil, warn: false)
|
2018-11-19 22:42:39 -05:00
|
|
|
SiteSetting.find_by(name: old_setting).destroy!
|
2018-11-15 20:19:58 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|