lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.45 vs lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.46

- old
+ new

@@ -1,10 +1,12 @@ ASSETS.cli.config do |config| ASSETS.config.workflow do |wf| io = nil rescued = false + cases_with_input = nil + cases_with_output = nil # default rescue wf.rescue do |exception, io| begin next io if rescued @@ -163,12 +165,19 @@ end wf.on(:end) do |wf_end, io| get_people = io.options.dig(:people, :get) partial_update = get_people && get_people.dig(:type) == :partial + unless !io.options[:end_get] || io.options[:dry_run] || partial_update - # Prevent getting people when there were no use cases that used them - unless io.people + people_update_cases = config.usecases.active(io: io).any? do |usecase, data| + [:transform, :sync].any? {|type| usecase.type == type} + end + + if !people_update_cases + # Prevent getting people when there were no use cases that used them + io.session.logger.info("Won't be recaching people, as there haven't been any targetted updates") + elsif !io.people people = io.session.micro.people_cache io = io.new(people: people) end end io