2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-08-14 11:56:23 +00:00
|
|
|
module Import
|
|
|
|
module Mixin
|
|
|
|
module Sequence
|
|
|
|
private
|
|
|
|
|
|
|
|
def sequence_name
|
|
|
|
raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
|
|
|
|
end
|
|
|
|
|
|
|
|
def process
|
2018-05-08 15:27:19 +00:00
|
|
|
# remove previous result information that may still be saved
|
|
|
|
# in case an import job was rescheduled
|
|
|
|
@import_job.update!(result: {})
|
|
|
|
|
2017-08-14 11:56:23 +00:00
|
|
|
Sequencer.process(sequence_name,
|
|
|
|
parameters: {
|
|
|
|
import_job: @import_job
|
|
|
|
})
|
|
|
|
end
|
|
|
|
alias start_import process
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|