taskbar_cleanup_job.rb 295 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TaskbarCleanupJob < ApplicationJob
  3. LAST_CONTACT_THRESHOLD = 1.day
  4. def perform
  5. Taskbar
  6. .where(app: :mobile)
  7. .where('last_contact < ?', LAST_CONTACT_THRESHOLD.ago)
  8. .destroy_all
  9. end
  10. end