Class: Pageflow::PollZencoderJob

Inherits:
ApplicationJob show all
Includes:
StateMachineJob
Defined in:
app/jobs/pageflow/poll_zencoder_job.rb

Direct Known Subclasses

PollMetaDataFromZencoderJob

Instance Method Summary collapse

Instance 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 perform_with_result(file, options, api = ZencoderApi.instance)
  options ||= {}

  catch(:halt) do
    poll_zencoder(file, api)
    fetch_input_details(file, api)
    file.post_process_encoded_files unless options[:skip_post_processing]

    :ok
  end
ensure
  file.save!
end