perform.rb 955 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Perform < Sequencer::Unit::Base
  3. prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
  4. skip_action :skipped, :failed
  5. uses :resources, :object, :import_job, :dry_run, :field_map, :id_map, :default_language
  6. optional :instance
  7. def process
  8. resources.each do |resource|
  9. ::Sequencer.process("Import::Kayako::#{object}",
  10. parameters: {
  11. import_job: import_job,
  12. dry_run: dry_run,
  13. resource: resource,
  14. default_language: default_language,
  15. field_map: field_map,
  16. id_map: id_map,
  17. instance: instance,
  18. })
  19. end
  20. end
  21. end