Sha256: aeac53edfcdb04d3279b9939152c8d27166828064838abb707b2507af52ede1b

Contents?: true

Size: 594 Bytes

Versions: 3

Compression:

Stored size: 594 Bytes

Contents

require 'sidekiq'

class AudioJob
  include Sidekiq::Worker

  def perform(audio_id)
    asset = Gluttonberg::Asset.find(audio_id)
    if Gluttonberg::Setting.get_setting("audio_assets") == "Enable"
      if !Gluttonberg::Setting.get_setting("s3_key_id").blank? && !Gluttonberg::Setting.get_setting("s3_access_key").blank? && !Gluttonberg::Setting.get_setting("s3_server_url").blank? && !Gluttonberg::Setting.get_setting("s3_bucket").blank?
        asset.copy_audios_to_s3
      end
    end
  end

  def save_asset_to(asset)
    Rails.root.to_s + "/public" + asset.asset_folder_path
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gluttonberg-core-3.0.2 lib/audio_job.rb
gluttonberg-core-3.0.1 lib/audio_job.rb
gluttonberg-core-3.0.0 lib/audio_job.rb