Class: SyncCommandCountsJob

Inherits:
Object
  • Object
show all
Includes:
SuckerPunch::Job
Defined in:
lib/esm/jobs/sync_command_counts_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(_) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/esm/jobs/sync_command_counts_job.rb', line 6

def perform(_)
  ESM::Database.with_connection do
    ESM::Command.all.each do |command|
      ESM::CommandCount.where(command_name: command.name).first_or_create
    end
  end
end