Class: Shingoncoder::Backend::Job
- Inherits:
-
Object
- Object
- Shingoncoder::Backend::Job
- Defined in:
- lib/shingoncoder/backend/job.rb
Class Method Summary collapse
-
.create(options) ⇒ Integer
Register the job and kicks off several derivatives.
Class Method Details
.create(options) ⇒ Integer
Register the job and kicks off several derivatives.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/shingoncoder/backend/job.rb', line 8 def create() uri = URI(.fetch(:input)) filename = case uri.scheme when 'file' uri.path else raise ArgumentError, "#{uri.scheme} is not yet implemented" end job = Shingoncoder::Backend::JobRegistry.create() job.outputs.each do |output| TranscodeJob.perform_later(output.id) end job.id end |