Class: Marty::CleanerJob
- Defined in:
- app/jobs/marty/cleaner_job.rb
Instance Attribute Summary
Attributes inherited from CronJob
Instance Method Summary collapse
Methods inherited from CronJob
#enqueue, #log_failure, #log_success, remove, reschedule, schedule, scheduled?
Instance Method Details
#perform ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/jobs/marty/cleaner_job.rb', line 3 def perform system_login = Rails.configuration.marty.system_account Marty::Logger.info("Starting CleanerJob as user: #{system_login}") system_user = Marty::User.find_by(login: system_login) Marty::Promises::Ruby::Create.call( module_name: 'Marty::Cleaner::CleanAll', method_name: 'call', method_args: [], params: { _user_id: system_user&.id } ) end |