diff --git a/CHANGELOG.md b/CHANGELOG.md index 60808b2..db09e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- \(PE-31689\) remove unnecessary fork in run_task endpoint + All significant changes to this repo will be summarized in this file. ## [v1.2.4](https://github.com/puppetlabs/ace/tree/v1.2.4) (2021-04-28) diff --git a/lib/ace/transport_app.rb b/lib/ace/transport_app.rb index d65d1a4..523c6cd 100644 --- a/lib/ace/transport_app.rb +++ b/lib/ace/transport_app.rb @@ -251,11 +251,9 @@ def self.trusted_facts(certname) parameters = body['parameters'] || {} - result = ForkUtil.isolate do - # Since this will only be on one node we can just return the first result - results = @executor.run_task(target, task, parameters) - scrub_stack_trace(results.first.to_data) - end + # Since this will only be on one node we can just return the first result + results = @executor.run_task(target, task, parameters) + result = scrub_stack_trace(results.first.to_data) [200, result.to_json] rescue Exception => e # rubocop:disable Lint/RescueException # handle all the things and make it obvious what happened