Skip to content

Commit

Permalink
Merge pull request #511 from beer-garden/Currert_Request_Support_None
Browse files Browse the repository at this point in the history
Fixed sub thread issue with cloning current request
  • Loading branch information
TheBurchLog authored Sep 30, 2024
2 parents ce995e9 + 91e864d commit c811ec4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ TBD
- Updated Plugin `max_concurrent` to support -1 to utilize the default formula that `concurrent.futures.ThreadPoolExecutor` supports `min(32, os.cpu_count() + 4)`
- Updated SystemClient to utilize the local Garden name for default Namespace if none can be determined
- Updated default Garden version to `UNKNOWN`
- Updated `get_current_request_read_only` to support sub threads calling where current_request is not populated

3.27.2
------
Expand Down
2 changes: 1 addition & 1 deletion brewtils/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_current_request_read_only():
Returns a copy of the current request, modifications to this object
do not impact the actual current request
"""
return copy.deepcopy(request_context.current_request)
return copy.deepcopy(getattr(request_context, "current_request", None))


class Plugin(object):
Expand Down

0 comments on commit c811ec4

Please sign in to comment.