app/lib/actions/proxy_action.rb in foreman-tasks-0.15.1 vs app/lib/actions/proxy_action.rb in foreman-tasks-0.15.2

- old
+ new

@@ -152,11 +152,13 @@ def proxy_output(live = false) if output.key?(:proxy_output) || state == :error output.fetch(:proxy_output, {}) elsif live && proxy_task_id - proxy_data = proxy.status_of_task(proxy_task_id)['actions'].detect { |action| action['class'] == proxy_action_name } + proxy_data = proxy.status_of_task(proxy_task_id)['actions'].detect do |action| + action['class'] == proxy_action_name || action.fetch('input', {})['proxy_operation_name'] == proxy_operation_name + end proxy_data.fetch('output', {}) else {} end end @@ -191,10 +193,10 @@ :retry_count => Setting['foreman_tasks_proxy_action_retry_count'] || 4, :proxy_batch_triggering => Setting['foreman_tasks_proxy_batch_trigger'] || false } end def with_batch_triggering?(proxy_version) - (proxy_version[:major] == 1 && proxy_version[:minor] > 20) || proxy_version[:major] > 1 && + ((proxy_version[:major] == 1 && proxy_version[:minor] > 20) || proxy_version[:major] > 1) && input.fetch(:connection_options, {}).fetch(:proxy_batch_triggering, false) end def clean_remote_task(*_args) remote_task.destroy! if remote_task