sub_sequence.rb 625 B

1234567891011121314151617181920212223242526272829
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Ldap::Sources::SubSequence < Sequencer::Unit::Base
  3. include ::Sequencer::Unit::Import::Common::SubSequence::Mixin::ImportJob
  4. uses :dry_run, :configs
  5. provides :found_ids
  6. def process
  7. found_ids = []
  8. configs.each do |config|
  9. result = sequence_resource(config)
  10. found_ids |= Array(result[:found_ids])
  11. end
  12. state.provide(:found_ids, found_ids)
  13. end
  14. def default_params
  15. super.merge(
  16. dry_run: dry_run,
  17. )
  18. end
  19. private
  20. def sequence
  21. 'Import::Ldap::Users'
  22. end
  23. end