Class: CleanupJob

Inherits:
ApplicationJob show all
Includes:
SmartCleanup
Defined in:
app/jobs/cleanup_job.rb

Defined Under Namespace

Modules: SmartCleanup

Constant Summary

Constants included from SmartCleanup

SmartCleanup::MAX_ITERATIONS, SmartCleanup::MIN_ERROR_TRUSTED

Instance Method Summary collapse

Methods included from SmartCleanup

#cleanup_period, #divide_period_into_parts, #median, #smart_cleanup

Instance Method Details

#perform(*_args) ⇒ Object


4
5
6
7
8
# File 'app/jobs/cleanup_job.rb', line 4

def perform(*_args)
  cleanup_blocked if need_cleanup?
  smart_cleanup if need_cleanup?
  cleanup_hard if need_cleanup?
end