Skip to content

Commit

Permalink
Merge branch '2019.8.x'
Browse files Browse the repository at this point in the history
* 2019.8.x:
  (maint) add changelog entry for PE-31689
  (PE-31689) Don't fork in run_task endpoint
  Merge pull request #93 from gimmyxd/maint/relax_concurrent
  • Loading branch information
steveax committed May 26, 2021
2 parents 93b5d55 + 788c58c commit 09a99d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions 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)
Expand Down
8 changes: 3 additions & 5 deletions lib/ace/transport_app.rb
Expand Up @@ -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
Expand Down

0 comments on commit 09a99d0

Please sign in to comment.