class Eco::API::UseCases::DefaultCases::SetSupervisorCase < Eco::API::Common::Loaders::UseCase name "set-supervisor" type :sync def main(entries, people, session, options, usecase) update = session.new_job("main", "update", :update, usecase) micro.with_each_present(entries, people, options, log_starter: true) do |entry, person| if entry.supervisor_id? micro.set_supervisor(person, entry.supervisor_id, people, options) do |unknown_id| session.logger.warn("Supervisor '#{entry.supervisor_id}' does not exist. Entry: #{entry.to_s(:identify)}") end end end end end