Class: Pageflow::PollZencoderJob

Inherits:
Object
  • Object
show all
Extended by:
StateMachineJob
Defined in:
app/jobs/pageflow/poll_zencoder_job.rb

Direct Known Subclasses

PollMetaDataFromZencoderJob

Class Method Summary collapse

Class Method Details

.perform_with_result(file, options, api = ZencoderApi.instance) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/jobs/pageflow/poll_zencoder_job.rb', line 7

def self.perform_with_result(file, options, api = ZencoderApi.instance)
  options ||= {}

  result = catch(:halt) do
    poll_zencoder(file, api)
    fetch_input_details(file, api)
    fetch_thumbnail(file) unless options[:skip_thumbnail]

    :ok
  end
ensure
  file.save!
end