diff --git a/app/models/talk.rb b/app/models/talk.rb index 88904e2c6..4a4959b8a 100644 --- a/app/models/talk.rb +++ b/app/models/talk.rb @@ -89,7 +89,8 @@ class Talk < ActiveRecord::Base transitions from: :processing, to: :archived, on_transition: :after_processing # or by user upload - transitions from: :pending, to: :archived + transitions from: :pending, to: :archived, + on_transition: :after_processing # in rare case we might to override a talk # which has never been enqueued transitions from: :postlive, to: :archived diff --git a/lib/audio_worker/runner.rb b/lib/audio_worker/runner.rb index 04f10c027..50d728e94 100644 --- a/lib/audio_worker/runner.rb +++ b/lib/audio_worker/runner.rb @@ -167,14 +167,14 @@ def run(job) puts "Target bucket: #{target_bucket}" puts "Job Type: #{type}" + # pull manifest file + manifest_url = "#{target_bucket}/manifest.yml" + s3_cp(manifest_url, path, target_region) + case type when "Job::Archive" - # pull manifest file - manifest_url = "#{target_bucket}/manifest.yml" - s3_cp(manifest_url, path, target_region) - # based on content pull source files manifest_path = File.join(path, 'manifest.yml') raise "No manifest file!" unless File.exist?(manifest_path)