Sha256: 3324c9b297a6690ff464f841d89aca61cc3a81f784f2f126d4afff35309b68e1
Contents?: true
Size: 1 KB
Versions: 9
Compression:
Stored size: 1 KB
Contents
# Copyright © 2012 The Pennsylvania State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class CharacterizeJob def queue_name :characterize end attr_accessor :generic_file_id def initialize(generic_file_id) self.generic_file_id = generic_file_id end def run generic_file = GenericFile.find(generic_file_id) generic_file.characterize generic_file.create_thumbnail if generic_file.video? Sufia.queue.push(TranscodeVideoJob.new(generic_file_id, 'content')) end end end
Version data entries
9 entries across 9 versions & 1 rubygems