Sha256: 7cf5edc137a059ef7f05f33e546e5932cf5112c7821cff19504a97c343ffc452

Contents?: true

Size: 449 Bytes

Versions: 8

Compression:

Stored size: 449 Bytes

Contents

module Pageflow
  module LinkmapPage
    class ProcessSourceImageFileJob < ApplicationJob
      queue_as :resizing

      include StateMachineJob

      def perform_with_result(file, _options)
        return :error if file.prerequisite_files.any?(&:failed?)
        return :pending unless file.prerequisite_files.all?(&:ready?)

        file.attachment = file.source_image_file.attachment
        file.save!

        :ok
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pageflow-linkmap-page-2.10.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.9.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.8.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.7.1 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.7.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.6.1 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.6.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb
pageflow-linkmap-page-2.5.0 app/jobs/pageflow/linkmap_page/process_source_image_file_job.rb