perform.rb 1020 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Freshdesk::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, :time_entry_available, :skip_initial_contacts
  6. def process
  7. resources.each do |resource|
  8. ::Sequencer.process("Import::Freshdesk::#{object}",
  9. parameters: {
  10. import_job: import_job,
  11. dry_run: dry_run,
  12. resource: resource,
  13. field_map: field_map,
  14. id_map: id_map,
  15. time_entry_available: time_entry_available,
  16. skip_initial_contacts: skip_initial_contacts,
  17. })
  18. end
  19. end
  20. end