Class: Marty::CleanerJob

Inherits:
CronJob
  • Object
show all
Defined in:
app/jobs/marty/cleaner_job.rb

Instance Attribute Summary

Attributes inherited from CronJob

#schedule_id

Instance Method Summary collapse

Methods inherited from CronJob

#enqueue, #log_failure, #log_success, remove, reschedule, schedule, scheduled?

Instance Method Details

#performObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/jobs/marty/cleaner_job.rb', line 3

def perform
   = Rails.configuration.marty.
  Marty::Logger.info("Starting CleanerJob as user: #{}")
  system_user = Marty::User.find_by(login: )

  Marty::Promises::Ruby::Create.call(
    module_name: 'Marty::Cleaner::CleanAll',
    method_name: 'call',
    method_args: [],
    params: { _user_id: system_user&.id }
  )
end