Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed sub thread issue with cloning current request #511

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading