From 6024fb84cc0f0b8332d40dc7c42dd53cd56c06ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 4 Jun 2018 19:06:52 +0200 Subject: [PATCH] make rubocop happy --- app/jobs/scheduled/clean_up_uploads.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/jobs/scheduled/clean_up_uploads.rb b/app/jobs/scheduled/clean_up_uploads.rb index d2d2cfe9642..d84fddce302 100644 --- a/app/jobs/scheduled/clean_up_uploads.rb +++ b/app/jobs/scheduled/clean_up_uploads.rb @@ -4,14 +4,14 @@ module Jobs def execute(args) grace_period = [SiteSetting.clean_orphan_uploads_grace_period_hours, 1].max - + # always remove invalid upload records Upload .where("retain_hours IS NULL OR created_at < current_timestamp - interval '1 hour' * retain_hours") .where("created_at < ?", grace_period.hour.ago) .where(url: "") .destroy_all - + return unless SiteSetting.clean_up_uploads? base_url = Discourse.store.internal? ? Discourse.store.relative_base_url : Discourse.store.absolute_base_url