Class: SyncCommandConfigurationsJob

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

Instance Method Summary collapse

Instance Method Details

#perform(_) ⇒ Object



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

def perform(_)
  ESM::Database.with_connection do
    community_ids = ESM::Community.all.pluck(:id)

    community_ids.each do |community_id|
      SyncCommandConfigurationsForCommunityJob.perform_async(community_id, ESM::Command.configurations)
    end
  end
end