lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.41 vs lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.42
- old
+ new
@@ -117,13 +117,11 @@
io.session.logger.warn(msg)
end
else
wf_post.skip!
msg = "Although there are post_launch cases, they will NOT be RUN"
- if !partial_update
- msg+= ", because it is not a partial update (-get-partial)"
- elsif io.options[:dry_run]
+ if io.options[:dry_run]
msg+= ", because we are in dry-run (simulate)."
end
io.session.logger.info(msg)
end
end
@@ -132,11 +130,19 @@
wf.for(:post_launch) do |wf_post|
wf_post.on(:usecases) do |wf_postcases, io|
io.session.post_launch.each do |use|
- io = use.launch(io: io).base
+ begin
+ io = use.launch(io: io).base
+ rescue Eco::API::UseCases::BaseIO::MissingParameter => e
+ if e.required == :people
+ io.session.logger.debug("Skipping use case '#{use.name}' -- no base people detected for the current run")
+ else
+ raise
+ end
+ end
end
io
end
wf_post.on(:launch_jobs) do |wf_postlaunch, io|
@@ -144,11 +150,16 @@
io
end
end
wf.on(:report) do |wf_report, io|
- #config.reports.active(io: io)
- #io.session.reports
+ if file = io.options.dig(:report, :people, :csv)
+ io.options.deep_merge!(export: {
+ options: {internal_names: true, nice_header: true, split_schemas: true},
+ file: {name: file, format: :csv}
+ })
+ io = io.session.process_case("to-csv", io: io, type: :export)
+ end
io
end
wf.on(:end) do |wf_end, io|
get_people = io.options.dig(:people, :get)