sequence.rb 665 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. module Import
  3. module Mixin
  4. module Sequence
  5. private
  6. def sequence_name
  7. raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
  8. end
  9. def process
  10. # remove previous result information that may still be saved
  11. # in case an import job was rescheduled
  12. @import_job.update!(result: {})
  13. Sequencer.process(sequence_name,
  14. parameters: {
  15. import_job: @import_job
  16. })
  17. end
  18. alias start_import process
  19. end
  20. end
  21. end